Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uforead, ufowrite, checkoutlinesufo fixes for reading & writing CID-keyed fonts #1353

Merged
merged 39 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7fe69bc
Clarify error when glyphs don't match font type. Fix reading UFO as C…
punchcutter Feb 26, 2021
aa73645
Clarify error when glyphs don't match font type. Fix reading UFO as C…
punchcutter Feb 26, 2021
5d33e1f
Fix test file
punchcutter Feb 26, 2021
6843f96
Updates to handling CID-keyed UFO
punchcutter Feb 28, 2021
3ec977c
Writing FontDict & FDArray into UFO
kaydeearts Mar 16, 2021
5b8abbb
ufowrite.c error fixes
kaydeearts Mar 22, 2021
6c01cbe
Default FontMatrix values & Array Fixes
kaydeearts Mar 25, 2021
25e8842
Reading in FDArray with multiple fdicts -- tests failing
kaydeearts Mar 25, 2021
4d26be2
Added FDArray Length to UFO
kaydeearts Mar 25, 2021
2bc0136
using memNew & memFree + code cleanup
kaydeearts Mar 25, 2021
dc0c839
Fixed FDArray for non-CID-keyed fonts + cleanup
kaydeearts Mar 25, 2021
57cd9c3
More fixes for other UFO font-types
kaydeearts Mar 26, 2021
f573a92
StdVW, StdHW, LanguageGroup support
kaydeearts Mar 29, 2021
a558237
[tx] updated expected outputs with StdVW, StdHW after bug fix
kaydeearts Mar 30, 2021
46f61ec
UFOs using fdict (makeotf_data/input/bug700.ufo) should not free memory
kaydeearts Mar 30, 2021
810a44c
Update test outputs (needs FontName fix)
kaydeearts Mar 30, 2021
4989643
Fix UFO dict writing. Update test files to be expected input/output.
punchcutter Mar 31, 2021
8f4023b
Updated parsing for all cases. memNew use needs fix (does not keep co…
kaydeearts Apr 1, 2021
b3a4f47
Removed unnecessary key & updated test
kaydeearts Apr 1, 2021
8671488
FontMatrix fix + update tests
kaydeearts Apr 5, 2021
40d6947
memory alloc + CIDFontVersion fix
kaydeearts Apr 6, 2021
d450813
FSType & ExpansionFactor add
kaydeearts Apr 6, 2021
942aa21
[uforead.c] Fix bug where version is NULL
kaydeearts Apr 6, 2021
3bf1f4f
[tests] add ExpansionFactor & FSType to tests
kaydeearts Apr 6, 2021
28e5569
[tx] Add 4 tests for UFO/CID-keyed font roundtrip
kaydeearts Apr 6, 2021
913748d
[tx] Add files for tests
kaydeearts Apr 6, 2021
34d726c
[uforead.c] reallocFDArray fix
kaydeearts Apr 7, 2021
9dc55f0
[tx_test] resolving windows test errors
kaydeearts Apr 8, 2021
9017794
flake8 fixes
kaydeearts Apr 8, 2021
80fbc31
[checkoutlinesufo] Changes for PFC
kaydeearts Apr 8, 2021
0e6f1bc
[checkoutlinesufo] debugging: observing windows vs mac output
kaydeearts Apr 9, 2021
f5769f4
[checkoutlinesufo_data] update expected output
kaydeearts Apr 22, 2021
6b39644
[checkoutlinesufo.py] Insert <lib> for each glif in secondary layer
kaydeearts Apr 30, 2021
80a961e
[uforead.c] Fix to always parse <lib>; add errors, tests; remove junk…
kaydeearts Apr 30, 2021
0d7c35e
[tx_test.py] Parametrized 4 tests
kaydeearts Apr 30, 2021
27e4415
[checkoutlinesufo_test] Update output for test_cidkeyed_remove_overlap
kaydeearts Apr 30, 2021
2de438c
[checkoutlinesufo.py] UFO format should be 2
kaydeearts Apr 30, 2021
daf94ec
Remove old file
kaydeearts Apr 30, 2021
eb2a963
[tx] delete comment and small test fix
kaydeearts May 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion c/public/lib/api/absfont.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ enum /* srcFontType values */
abfSrcFontTypeCFFCID,
abfSrcFontTypeSVGName,
abfSrcFontTypeUFOName,
abfSrcFontTypeTrueType
abfSrcFontTypeTrueType,
abfSrcFontTypeUFOCID,
};

typedef struct
Expand Down
3 changes: 2 additions & 1 deletion c/public/lib/api/t1werr.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ CTL_DCL_ERR(t1wErrTmpStream, "temporary stream error")
CTL_DCL_ERR(t1wErrSINGStream, "SING stream error")
CTL_DCL_ERR(t1wErrBadDict, "bad font dictionary. Missing the PostScript FontName.")
CTL_DCL_ERR(t1wErrBadCIDDict, "bad font dictionary. Missing either the CID font name, or the Registry-Order-Supplement names.")
CTL_DCL_ERR(t1wErrGlyphType, "glyph type doesn't match font type")
CTL_DCL_ERR(t1wErrGlyphTypeCIDt1, "glyph type (CID) doesn't match font type (t1)")
CTL_DCL_ERR(t1wErrGlyphTypet1CID, "glyph type (t1) doesn't match font type (CID)")
CTL_DCL_ERR(t1wErrBadCall, "inappropriate function call or arguments")
CTL_DCL_ERR(t1wErrDupEnc, "multiple glyphs with the same encoding")
CTL_DCL_ERR(t1wErrNoCID0, "missing CID 0 glyph")
Expand Down
3 changes: 3 additions & 0 deletions c/public/lib/source/absfont/absfont_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ static void dumpTopDict(abfDumpCtx h, abfTopDict *top) {
case abfSrcFontTypeUFOName:
srcFontType = "UFO (name-keyed)";
break;
case abfSrcFontTypeUFOCID:
srcFontType = "UFO (cid-keyed)";
break;
case abfSrcFontTypeTrueType:
srcFontType = "TrueType";
break;
Expand Down
4 changes: 2 additions & 2 deletions c/public/lib/source/t1write/t1write.c
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ static void writeAddnNameKeyedFont(t1wCtx h) {
/* Write name-keyed font. */
static void writeNameKeyedFont(t1wCtx h) {
if (h->flags & SEEN_CID_KEYED_GLYPH)
fatal(h, t1wErrGlyphType);
fatal(h, t1wErrGlyphTypeCIDt1);

/* Validate name-keyed data */
if (h->top->FDArray.cnt != 1 ||
Expand Down Expand Up @@ -1893,7 +1893,7 @@ static void writeAddnCIDKeyedFont(t1wCtx h) {
/* Write cid-keyed font. */
static void writeCIDKeyedFont(t1wCtx h) {
if (h->flags & SEEN_NAME_KEYED_GLYPH)
fatal(h, t1wErrGlyphType);
fatal(h, t1wErrGlyphTypet1CID);

/* Validate CID data */
if (h->top->cid.Registry.ptr == ABF_UNSET_PTR ||
Expand Down
Loading