调整字体素材槽统计语义
仅将 Bound 字体计入素材槽并视为已绑定 SystemFont 不再计入素材槽、待绑定或组件素材需求 同步 binding overview 回归测试
This commit is contained in:
@@ -46,7 +46,13 @@ export function getImageBindingCounts(
|
||||
export function getTextBindingCounts(
|
||||
component: Extract<Component, { Text: unknown }>['Text'],
|
||||
): ComponentBindingCounts {
|
||||
void component;
|
||||
if (
|
||||
typeof component.font !== 'object' ||
|
||||
component.font === null ||
|
||||
!('Bound' in component.font)
|
||||
) {
|
||||
return EMPTY_COMPONENT_BINDING_COUNTS;
|
||||
}
|
||||
return countRequiredAssetSlot(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -105,9 +105,9 @@ const trees: UITree[] = [
|
||||
describe('getBindingOverview', () => {
|
||||
it('uses per-component helpers to include both image and text slots', () => {
|
||||
expect(getBindingOverview(trees, sprites)).toEqual({
|
||||
componentsNeedingAssets: 4,
|
||||
assetSlots: 4,
|
||||
boundSlots: 3,
|
||||
componentsNeedingAssets: 3,
|
||||
assetSlots: 3,
|
||||
boundSlots: 2,
|
||||
pendingSlots: 1,
|
||||
needsAttention: 2,
|
||||
blocked: 1,
|
||||
|
||||
Reference in New Issue
Block a user