Skip to content

Commit

Permalink
cff: Correct private DICT definition
Browse files Browse the repository at this point in the history
[why]
FamilyBlues has two Ops, probably a copy and paste leftover.
And two Ops are missing.

This is now in line with CFF and CFF2 fonts.

Signed-off-by: Fini Jastrow <[email protected]>
  • Loading branch information
Finii authored and Connum committed Sep 9, 2024
1 parent b4c4b96 commit 08c751e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tables/cff.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ const PRIVATE_DICT_META = [
const PRIVATE_DICT_META_CFF2 = [
{name: 'blueValues', op: 6, type: 'delta'},
{name: 'otherBlues', op: 7, type: 'delta'},
{name: 'familyBlues', op: 7, type: 'delta'},
{name: 'familyBlues', op: 8, type: 'delta'},
{name: 'familyOtherBlues', op: 9, type: 'delta'},
{name: 'blueScale', op: 1209, type: 'number', value: 0.039625},
Expand All @@ -411,8 +410,10 @@ const PRIVATE_DICT_META_CFF2 = [
{name: 'stemSnapV', op: 1213, type: 'number'},
{name: 'languageGroup', op: 1217, type: 'number', value: 0},
{name: 'expansionFactor', op: 1218, type: 'number', value: 0.06},
{name: 'vsindex', op: 22, type: 'number', value: 0},
{name: 'subrs', op: 19, type: 'offset'},
{name: 'defaultWidthX', op: 20, type: 'number', value: 0},
{name: 'nominalWidthX', op: 21, type: 'number', value: 0},
{name: 'vsindex', op: 22, type: 'number', value: 0},
];

// https://learn.microsoft.com/en-us/typography/opentype/spec/cff2#table-10-font-dict-operator-entries
Expand Down

0 comments on commit 08c751e

Please sign in to comment.