Closed Sruimeng closed 5 months ago
Enhancements have been made to font management in the AssetManager
class in asset-manager.ts
. This involves utilizing getFontFamily
and isFontFamily
utilities for better font handling. The FontFace
constructor now employs getFontFamily
for correct font family names, and validation checks using isFontFamily
have been implemented to alert about unsupported font families.
File Path | Summary |
---|---|
packages/effects-core/src/asset-manager.ts |
Added imports for getFontFamily and isFontFamily . Updated FontFace constructor and added checks for font families. |
packages/effects-core/src/plugins/text/text-item.ts |
Modified setFontFamily method to include isFontFamily check, logging warnings and preventing changes for unsupported font families. |
Amongst the code's dance, fonts take their stance,
A rabbit appears with changes, a chance.
Fonts now inspected, warnings alight,
Each family tended, just right in its right.
WithgetFontFamily
and checks so neat,
AssetManager's task now complete.
🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit