@@ -264,22 +264,28 @@ function makeCustomFont(settings) {
264
264
// ######################
265
265
// #3 change the names
266
266
// 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
268
273
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
271
277
272
- font . names . windows . fontFamily . en = ` ${ websiteData . fontName } `
278
+ font . names . windows . fontFamily . en = fontFamily
273
279
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
276
282
font . names . windows . uniqueID . en = `${ font . names . windows . version . en } ;;${ websiteData . fontName } -${ settings . style
277
283
. split ( " " )
278
284
. join ( "" ) } ;2023;FL820`
279
- delete font . names . windows . preferredSubfamily
285
+ delete font . names . windows . preferredFamily
280
286
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
283
289
font . tables . cff . topDict . weight = settings . weight == 700 ? "Bold" : "Regular"
284
290
285
291
// set correct mac style
0 commit comments