diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-08 12:31:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-08 12:36:24 +0000 |
commit | eb1352bb40b3571ee215d6f8bf0c8a0a85297aa4 (patch) | |
tree | e63470f07144e353b9627376bdff1fb00b92b1fd /vcl/source/fontsubset | |
parent | b6f9eeb9b5c0e29ca655185dc299ebd4a2c092d7 (diff) |
drop unused enum TTCreationFlags
there is only one method using it, and all of the call sites pass 0
Change-Id: I5d71b36cf890fbcf0be9d795756da0cfd61ae309
Reviewed-on: https://gerrit.libreoffice.org/34024
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/fontsubset')
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 50 |
1 files changed, 7 insertions, 43 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index c4c9e6987e54..edc08d248361 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1944,8 +1944,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf, sal_uInt8 *encoding, int nGlyphs, int nNameRecs, - NameRecord *nr, - sal_uInt32 flags) + NameRecord *nr) { TrueTypeCreator *ttcr; TrueTypeTable *head=nullptr, *hhea=nullptr, *maxp=nullptr, *cvt=nullptr, *prep=nullptr, *glyf=nullptr, *fpgm=nullptr, *cmap=nullptr, *name=nullptr, *post = nullptr, *os2 = nullptr; @@ -1956,42 +1955,13 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf, /** name **/ - if (flags & TTCF_AutoName) { - /* not implemented yet - NameRecord *names; - NameRecord newname; - int n = GetTTNameRecords(ttf, &names); - int n1 = 0, n2 = 0, n3 = 0, n4 = 0, n5 = 0, n6 = 0; - sal_uInt8 *cp1; - sal_uInt8 suffix[32]; - sal_uInt32 c1 = crc32(glyphArray, nGlyphs * 2); - sal_uInt32 c2 = crc32(encoding, nGlyphs); - int len; - snprintf(suffix, 31, "S%08X%08X-%d", c1, c2, nGlyphs); - - name = TrueTypeTableNew_name(0, 0); - for (i = 0; i < n; i++) { - if (names[i].platformID == 1 && names[i].encodingID == 0 && names[i].languageID == 0 && names[i].nameID == 1) { - - memcpy(newname, names+i, sizeof(NameRecord)); - newname.slen = name[i].slen + strlen(suffix); - */ - const sal_uInt8 ptr[] = {0,'T',0,'r',0,'u',0,'e',0,'T',0,'y',0,'p',0,'e',0,'S',0,'u',0,'b',0,'s',0,'e',0,'t'}; - NameRecord n1 = {1, 0, 0, 6, 14, const_cast<sal_uInt8 *>(reinterpret_cast<sal_uInt8 const *>("TrueTypeSubset"))}; - NameRecord n2 = {3, 1, 1033, 6, 28, nullptr}; - n2.sptr = const_cast<sal_uInt8 *>(ptr); - name = TrueTypeTableNew_name(0, nullptr); - nameAdd(name, &n1); - nameAdd(name, &n2); + if (nNameRecs == 0) { + NameRecord *names; + int n = GetTTNameRecords(ttf, &names); + name = TrueTypeTableNew_name(n, names); + DisposeNameRecords(names, n); } else { - if (nNameRecs == 0) { - NameRecord *names; - int n = GetTTNameRecords(ttf, &names); - name = TrueTypeTableNew_name(n, names); - DisposeNameRecords(names, n); - } else { - name = TrueTypeTableNew_name(nNameRecs, nr); - } + name = TrueTypeTableNew_name(nNameRecs, nr); } /** maxp **/ @@ -2059,12 +2029,6 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf, post = TrueTypeTableNew_post(0x00030000, 0, 0, 0, 0); } - if (flags & TTCF_IncludeOS2) { - if ((p = getTable(ttf, O_OS2)) != nullptr) { - os2 = TrueTypeTableNew(T_OS2, getTableSize(ttf, O_OS2), p); - } - } - AddTable(ttcr, name); AddTable(ttcr, maxp); AddTable(ttcr, hhea); AddTable(ttcr, head); AddTable(ttcr, glyf); AddTable(ttcr, cmap); AddTable(ttcr, cvt ); AddTable(ttcr, prep); AddTable(ttcr, fpgm); |