Michiharu Ariza
1239b6b2b4
Merge branch 'master' into cff-more-arrayof-fixes
2019-02-07 10:29:40 -08:00
Michiharu Ariza
a5fa76977b
Merge branch 'master' into cff-retain-gids
2019-02-07 10:28:13 -08:00
Michiharu Ariza
214d0b024b
minor change
2019-02-07 10:27:43 -08:00
Ken Cunningham
7859decdd0
hb-coretext.cc: clean up macosx test
...
TARGET_OS_OSX was introduced only in late OS versions
so always returns as "0" on older systems.
if !TARGET_OS_IPHONE can work, as it returns as !0 on older
systems where TARGET_OS_IPHONE is not defined, but is not
specific
if TARGET_OS_MAC && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
is both specific and accurate on all systems.
2019-02-05 20:26:49 -08:00
Michiharu Ariza
30b781f20a
Merge branch 'master' into cff-retain-gids
2019-02-01 14:50:34 -08:00
Michiharu Ariza
c12862657f
added desubroutinize & retain-gids full test cases with CFF fonts
...
and CFF retain-gids fixes
2019-02-01 14:50:01 -08:00
Michiharu Ariza
f2908b4d8f
Implement subset --regain-gids option with CFF1/2
...
along with api tests & expected results
2019-01-31 14:16:37 -08:00
Behdad Esfahbod
1e06282105
Adjust hb_is_signed<>
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1535
2019-01-31 13:57:17 -08:00
Behdad Esfahbod
21ea1c9152
Remove stale comment
2019-01-31 13:57:17 -08:00
Michiharu Ariza
9f80eb0177
Merge branch 'master' into cff-more-arrayof-fixes
2019-01-31 12:54:36 -08:00
Behdad Esfahbod
d983c529b6
Merge pull request #1564 from googlefonts/retain_gids
...
[subset] Add --retain-gids option to the subsetter.
2019-01-30 17:17:59 -05:00
Behdad Esfahbod
55d1d7c8bc
2.3.1
2019-01-30 13:54:15 -08:00
Garret Rieger
198859bb37
[subset] For retain gids don't truncate glyphs past the highest requested subset glyph.
2019-01-29 13:19:21 -08:00
Garret Rieger
05e99c86ba
[subset] A few small fixes for the new subset plan api.
2019-01-29 13:19:21 -08:00
Garret Rieger
bdbe047d6c
[subset] Update hb-subset-plan.cc to match hb-subset-plan.hh.
2019-01-29 13:19:21 -08:00
Garret Rieger
74c44ffeba
[subset] Update hb-subset-glyf.cc to use new hb-subset-plan API.
2019-01-29 13:19:21 -08:00
Garret Rieger
4842294b86
[subset] Update gsub to use glyphset() method of subset plan.
2019-01-29 13:19:21 -08:00
Garret Rieger
853b1f1aa5
[subset] Correct maxp num glyph's to use new subset plan method.
2019-01-29 13:19:21 -08:00
Garret Rieger
846e05a298
[subset] Re-add glyphs array to subset plan, with new name 'glyphs_deprecated'. Switch CFF subsetting to use it.
2019-01-29 13:19:21 -08:00
Garret Rieger
03e88eab5c
Re-implement HMTX/VMTX subsetting. Update it to support glyph renumbering and simplify the implementation.
2019-01-29 13:19:21 -08:00
Garret Rieger
925be29223
Update hb-ot-vorg-table and hb-ot-layout-common to use the updated subset plan api.
2019-01-29 13:19:21 -08:00
Garret Rieger
4af3be6ef8
Remove glyph array from subset plan, make num_glyphs and glyphset private.
2019-01-29 13:19:21 -08:00
Garret Rieger
23f364429d
[subset] Fix hdmx subsetting when retain gids is enabled.
2019-01-29 13:19:21 -08:00
Garret Rieger
2da1654aef
[subset] Compute num_glyphs during subset plan construction.
...
Update maxp to use the correct num glyphs.
2019-01-29 13:19:21 -08:00
Garret Rieger
96b038f375
[subset] fix failure to init instruction ranges values for an invalid glyph.
2019-01-29 13:19:21 -08:00
Garret Rieger
4b1ac3a2fa
[subset] Do some refactoring in hb-subset-glyf.cc.
...
- Extract code out into helper methods in several places.
- Bundle loca address, size and is short into a struct.
2019-01-29 13:19:21 -08:00
Garret Rieger
b7f971884e
Add retain_gids option to subset input. Update glyf and loca handling to respect retain_gids.
2019-01-29 13:19:21 -08:00
Michiharu Ariza
b379900755
Merge branch 'master' into cff-more-arrayof-fixes
2019-01-29 12:19:57 -08:00
Behdad Esfahbod
9a1df82e3f
[uniscribe] Whitelist function type cast
2019-01-28 14:15:18 -05:00
Behdad Esfahbod
6e1c3eaf70
Fix sign comparison error
2019-01-28 14:12:41 -05:00
Behdad Esfahbod
9db7a7da63
Fix warning
...
c:\projects\harfbuzz\src\hb-ot-color-cbdt-table.hh(59): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
2019-01-28 14:09:59 -05:00
Behdad Esfahbod
51b584880e
[pragma] Silence MSVC unknown-pragma warning
2019-01-28 14:09:45 -05:00
Behdad Esfahbod
60022ecced
Fix -Wcast-function-type warnings in util/ with gcc 4.8
2019-01-26 14:04:51 +01:00
Behdad Esfahbod
f398097529
More static constexpr
2019-01-25 16:08:25 +01:00
Michiharu Ariza
c685644386
Merge branch 'master' into cff-more-arrayof-fixes
2019-01-24 13:19:18 -08:00
Behdad Esfahbod
e970de48bc
[AAT] Minor sign
2019-01-24 18:16:17 +01:00
Behdad Esfahbod
a371a28cda
[AAT] Use a ring buffer for ligature stack
...
I think Apple does very similarly, but probably with a stack size of 16.
We do it with a stack size that is currently set to 64.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1531
2019-01-24 18:12:25 +01:00
Behdad Esfahbod
7886b1578f
Whitespace
2019-01-24 18:06:17 +01:00
Behdad Esfahbod
b976940243
[AAT] Handle transition errors during machine operation
...
Before we used to give up. Now, just ignore error and continue processing.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1531
2019-01-24 18:01:07 +01:00
Michiharu Ariza
0bd0a3311c
Merge branch 'master' into cff-more-arrayof-fixes
2019-01-24 08:53:28 -08:00
Behdad Esfahbod
e234bb6a42
[AAT] Ignore machine errors and continue
2019-01-24 17:23:11 +01:00
Behdad Esfahbod
1ec90514f6
[AAT] Minor
2019-01-24 17:21:41 +01:00
Behdad Esfahbod
299eca0c3b
[AAT] Handle out-of-bounds classes
2019-01-24 17:17:00 +01:00
Behdad Esfahbod
c4623db4a3
[AAT] Minor
2019-01-24 17:10:12 +01:00
Behdad Esfahbod
c4e36f97b6
[AAT] Minor
2019-01-24 17:06:16 +01:00
Behdad Esfahbod
f60282c5bf
More pragma control
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=924848
2019-01-24 16:29:09 +01:00
Behdad Esfahbod
fd0889f903
Comment
2019-01-24 16:12:52 +01:00
Behdad Esfahbod
9f31417733
Form cluster for Emoji sub-region tag sequences
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1556
2019-01-24 16:08:33 +01:00
Behdad Esfahbod
3ecda71041
Adjust mark offsets when zeroing from fallback mark positioning code
...
Adjust tests.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1532
2019-01-24 12:28:24 +01:00
Michiharu Ariza
12cd3171ba
Merge branch 'master' into cff-more-arrayof-fixes
2019-01-23 14:05:42 -08:00
Michiharu Ariza
261a742181
more rewriting with ArrayOf<>
...
CFF1 Encoding0, Encoding1, CFF1SuppEncData
2019-01-23 14:04:29 -08:00
Behdad Esfahbod
36fb2b4da9
[AAT] In InsertionChain, set mark to previous-position if inserting
...
Fixes MORX-31
2019-01-23 20:53:57 +01:00
Behdad Esfahbod
baf4d6a68a
[AAT] Remove mark_set from InsertionChain
2019-01-23 20:36:07 +01:00
Behdad Esfahbod
0b2fa342de
More of previous
2019-01-22 16:36:00 +01:00
Behdad Esfahbod
a5e5dd8b42
Fix sign-compare error resulted from promoting unsigned integers to signed larger ints
...
Clang and gcc know not to warn in these cases, but not nonmainstream compilers
2019-01-22 16:30:07 +01:00
Behdad Esfahbod
32379bbf10
Cast HB_UNTAG results to uint8_t
2019-01-22 12:55:29 +01:00
Behdad Esfahbod
83d4aa5ca9
More -Wcast-error fix
2019-01-22 12:52:23 +01:00
Behdad Esfahbod
447323b85a
Better fix for -Wcast-align errors
2019-01-22 12:50:12 +01:00
Behdad Esfahbod
81ec543d80
More -Wcast-error fixes
2019-01-22 12:43:12 +01:00
Behdad Esfahbod
9077272549
pragma GCC diagnostic error "-Wsign-compare"
2019-01-22 12:40:18 +01:00
Behdad Esfahbod
8d05bf7dc0
Fix cast-align error
...
If compiler doesn't inline StructAtOffset, this was an error since we
only disable cast-align at call-site. So, move the cast out.
../src/hb-machinery.hh: In instantiation of 'const Type& StructAtOffset(const void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:146:85: required from here
../src/hb-machinery.hh:63:12: error: cast from 'const char*' to 'const unsigned int*' increases required alignment of target type [-Werror=cast-align]
{ return * reinterpret_cast<const Type*> ((const char *) P + offset); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:147:79: required from here
../src/hb-machinery.hh:66:12: error: cast from 'char*' to 'unsigned int*' increases required alignment of target type [-Werror=cast-align]
{ return * reinterpret_cast<Type*> ((char *) P + offset); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-01-22 12:34:05 +01:00
Behdad Esfahbod
70a52d6bd8
Convert all other enum class consts to static constexpr
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
5d4b0377b9
Convert unsigned enum class consts to static constexpr
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
ef00654962
Convert tag enum class consts to static constexpr
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
39e1b6d03f
Convert boolean enum class consts to static constexpr
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1553
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
271cb7c1c0
Make some enum constants unsigned
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
3d9a6e6266
Whitespace
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
c81f02fd06
pragma GCC diagnostic error "-Wvla"
2019-01-22 12:17:26 +01:00
Behdad Esfahbod
380c3cffb9
Use enum for class constant
2019-01-22 10:51:20 +01:00
Behdad Esfahbod
6d042a18e7
[CFF] Use enum for tableTag
2019-01-22 10:51:20 +01:00
Behdad Esfahbod
c1cbbb9459
Use static constexpr for large class constants
2019-01-22 10:51:20 +01:00
Behdad Esfahbod
043b610fa6
Fix sign compare warnings
...
../../third_party/harfbuzz-ng/src/src/hb-map.hh(56,45): warning: comparison of integers of different signs: 'const hb_codepoint_t' (aka 'const unsigned int') and 'hb_map_t::(anonymous enum at ../../third_party/harfbuzz-ng/src/src/hb-map.hh:169:3)' [-Wsign-compare]
bool is_unused () const { return key == INVALID; }
2019-01-19 09:21:33 -05:00
Behdad Esfahbod
ce317d0320
Fix warning
...
warning: '_WIN64' is not defined, evaluates to 0 [-Wundef]
2019-01-19 09:21:33 -05:00
Ebrahim Byagowi
0c2bd1b160
[dwrite] Fix delete-non-virtual-dtor warning ( #1550 )
2019-01-19 16:30:07 +03:30
Behdad Esfahbod
89bcfb204c
Remove TRACE_COLLECT_GLYPHS
2019-01-18 14:59:18 -05:00
Behdad Esfahbod
f13b6786f0
[pragma] Only add if GCC or clang
2019-01-18 14:53:54 -05:00
Behdad Esfahbod
c2ea7a9da4
[directwrite] More fix
2019-01-18 14:20:45 -05:00
Ebrahim Byagowi
9714d3ec5c
[dwrite] Try to fix delete-non-virtual-dtor warnings
...
Fixes #1548 hopefully
2019-01-18 21:55:21 +03:30
Behdad Esfahbod
0772c06f96
Remove tracing from closure
2019-01-18 12:53:47 -05:00
Behdad Esfahbod
d9f6be3a61
Fix -Wundef errors with __GNUC__
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1549
2019-01-18 12:53:47 -05:00
Michiharu Ariza
28917e58f9
init interp_env_t::hintmask_size
...
fixes issue #1547
2019-01-18 09:43:51 -08:00
Behdad Esfahbod
9b4e51b2e4
[pragma] Enable error -Wdelete-non-virtual-dtor
...
Currently fails directwrite backend.
2019-01-18 12:23:02 -05:00
Behdad Esfahbod
e65272281c
[directwrite] Fix error
...
hb-directwrite.cc: In constructor 'TextAnalysis::TextAnalysis(const wchar_t*, uint32_t, const wchar_t*, DWRITE_READING_DIRECTION)':
hb-directwrite.cc:489:18: error: 'TextAnalysis::mText' will be initialized after [-Werror=reorder]
const wchar_t* mText;
^~~~~
hb-directwrite.cc:488:12: error: 'uint32_t TextAnalysis::mTextLength' [-Werror=reorder]
uint32_t mTextLength;
^~~~~~~~~~~
hb-directwrite.cc:282:3: error: when initialized here [-Werror=reorder]
TextAnalysis (const wchar_t* text, uint32_t textLength,
^~~~~~~~~~~~
hb-directwrite.cc: In function 'hb_bool_t _hb_directwrite_shape_full(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, const hb_feature_t*, unsigned int, float)':
2019-01-18 12:22:07 -05:00
Behdad Esfahbod
b900f78088
[pragma] More cast-align whitelist
2019-01-18 10:08:23 -05:00
Behdad Esfahbod
0d8b931bbe
[pragma] Allow cast-align in hb-font.cc
...
../src/hb-machinery.hh: In instantiation of 'const Type& StructAtOffset(const void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:144:85: required from here
../src/hb-machinery.hh:63:12: error: cast from 'const char*' to 'const unsigned int*' increases required alignment of target type [-Werror=cast-align]
{ return * reinterpret_cast<const Type*> ((const char *) P + offset); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:145:79: required from here
../src/hb-machinery.hh:66:12: error: cast from 'char*' to 'unsigned int*' increases required alignment of target type [-Werror=cast-align]
{ return * reinterpret_cast<Type*> ((char *) P + offset); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = int]':
2019-01-18 10:03:43 -05:00
Behdad Esfahbod
a25174a56b
[pragma] GCC diagnostic error "-Wreorder"
2019-01-18 09:59:36 -05:00
Behdad Esfahbod
4660090569
[pragma] GCC diagnostic warning "-Wmaybe-uninitialized"
2019-01-18 09:53:16 -05:00
Behdad Esfahbod
7a634d7d5b
[pragma] Massage more
2019-01-18 09:49:14 -05:00
Behdad Esfahbod
16e5ba85b1
[pragma] More
2019-01-18 09:46:17 -05:00
Behdad Esfahbod
2bd530d598
[pragma] Reorg again
...
https://github.com/harfbuzz/harfbuzz/issues/1546
2019-01-18 09:28:22 -05:00
Behdad Esfahbod
c04272fac8
[pragma] GCC diagnostic ignored "-Wunknown-warning-option"
...
Try at fixing https://github.com/harfbuzz/harfbuzz/issues/1546
2019-01-18 08:49:45 -05:00
Behdad Esfahbod
4d3c8f9685
[uniscribe] More warnings
2019-01-17 19:58:54 -05:00
Behdad Esfahbod
6a5d2b21d8
[uniscribe] Fix warnings
2019-01-17 19:57:17 -05:00
Behdad Esfahbod
5b13e458c3
Fix build
2019-01-17 19:52:32 -05:00
Behdad Esfahbod
a77bd6bb89
[pragma] GCC diagnostic ignored "-Wclass-memaccess"
2019-01-17 19:33:41 -05:00
Behdad Esfahbod
436c7b294a
[pragma] ignored -Wunsafe-loop-optimizations // TODO fix
2019-01-17 19:03:33 -05:00
Behdad Esfahbod
e3b3181e9d
[pragma] error -Wclass-memaccess
2019-01-17 19:02:06 -05:00
Behdad Esfahbod
1a6b97a491
[pragma] More
2019-01-17 18:55:03 -05:00
Behdad Esfahbod
06e8091661
[pragma] More
2019-01-17 18:47:32 -05:00
Behdad Esfahbod
1077e40bf1
[pragma] Flesh out more
2019-01-17 18:36:10 -05:00