fix(core): some fonts are unavailable (#8139)

close AF-1349 AF-1347
This commit is contained in:
JimmFly
2024-09-06 05:08:12 +00:00
parent 7d93fae1dd
commit a027cef457
3 changed files with 11 additions and 10 deletions

View File

@@ -234,7 +234,7 @@ const FontMenuItem = ({
onSelect: (font: string) => void;
}) => {
const handleFontSelect = useCallback(
() => onSelect(font.fullName),
() => onSelect(font.family),
[font, onSelect]
);
const fontFamily = getFontFamily(font.family);
@@ -268,6 +268,7 @@ const CustomFontFamilySettings = () => {
const settings = useLiveData(editorSettingService.editorSetting.settings$);
const fontFamily = getFontFamily(settings.customFontFamily);
const onCustomFontFamilyChange = useCallback(
(fontFamily: string) => {
editorSettingService.editorSetting.set('customFontFamily', fontFamily);