@@ -264,22 +264,28 @@ function makeCustomFont(settings) {
264264 // ######################
265265 // #3 change the names
266266 // give custom names to each member of the style group
267- font . names . macintosh . fontFamily . en = `${ websiteData . fontName } `
267+
268+ const fontFamily = websiteData . fontName
269+ const fullName = `${ websiteData . fontName } ${ settings . style } `
270+ const postScriptName = `${ websiteData . fontName } -${ settings . style . split ( " " ) . join ( "" ) } `
271+
272+ font . names . macintosh . fontFamily . en = fontFamily
268273 font . names . macintosh . fontSubfamily . en = settings . style
269- font . names . macintosh . fullName . en = `${ websiteData . fontName } ${ settings . style } `
270- font . names . macintosh . postScriptName . en = `${ websiteData . fontName } -${ settings . style . split ( " " ) . join ( "" ) } `
274+ font . names . macintosh . fullName . en = fullName
275+ font . names . macintosh . postScriptName . en = postScriptName
276+ font . names . macintosh . preferredSubfamily = font . names . windows . preferredSubfamily
271277
272- font . names . windows . fontFamily . en = ` ${ websiteData . fontName } `
278+ font . names . windows . fontFamily . en = fontFamily
273279 font . names . windows . fontSubfamily . en = settings . style
274- font . names . windows . fullName . en = ` ${ websiteData . fontName } ${ settings . style } `
275- font . names . windows . postScriptName . en = ` ${ websiteData . fontName } - ${ settings . style . split ( " " ) . join ( "" ) } `
280+ font . names . windows . fullName . en = fullName
281+ font . names . windows . postScriptName . en = postScriptName
276282 font . names . windows . uniqueID . en = `${ font . names . windows . version . en } ;;${ websiteData . fontName } -${ settings . style
277283 . split ( " " )
278284 . join ( "" ) } ;2023;FL820`
279- delete font . names . windows . preferredSubfamily
285+ delete font . names . windows . preferredFamily
280286
281- font . tables . cff . topDict . familyName = ` ${ websiteData . fontName } ` ;
282- font . tables . cff . topDict . fullName = ` ${ websiteData . fontName } ${ settings . style } `
287+ font . tables . cff . topDict . familyName = fontFamily
288+ font . tables . cff . topDict . fullName = fullName
283289 font . tables . cff . topDict . weight = settings . weight == 700 ? "Bold" : "Regular"
284290
285291 // set correct mac style
0 commit comments