Commit Graph

10595 Commits

Author SHA1 Message Date
Behdad Esfahbod 8ed78627f0 [glyf] Split off GlyphHeader.hh 2022-06-25 17:53:13 -06:00
Behdad Esfahbod 81315a3016 [glyf] Namespace implementation in glyf_impl
Part of https://github.com/harfbuzz/harfbuzz/issues/3677
2022-06-25 17:50:44 -06:00
Behdad Esfahbod be1d4bcf29 [glyf] Add fast __end__ to composite iterator 2022-06-25 17:45:21 -06:00
Behdad Esfahbod ef250eea7e [glyf] Move a few structs out of Glyph{} 2022-06-25 17:37:59 -06:00
Behdad Esfahbod ae75f066b5 [glyf] Split SubsetGlyph 2022-06-25 17:12:10 -06:00
Behdad Esfahbod 0031069f47 [glyf] Fix includes 2022-06-25 17:05:18 -06:00
Behdad Esfahbod b4a0c30d98 [glyf] Remove hardcoded HB_MAX_COMPOSITE_OPERATIONS 2022-06-25 17:01:11 -06:00
Behdad Esfahbod 36373ee15c [glyf] Move add_gid_and_children to subset-plan where it belongs 2022-06-25 16:55:26 -06:00
Behdad Esfahbod ba1c9eda38 [glyf] Use a range for loop 2022-06-25 16:51:33 -06:00
Behdad Esfahbod e4f2bc9342 [glyf] Split Glyph.hh 2022-06-25 16:47:06 -06:00
Behdad Esfahbod 3f9c6bf3fc [glyf] Minor in _write_loca() 2022-06-25 14:46:26 -06:00
Behdad Esfahbod 852985da0f [glyf] Split loca.hh 2022-06-25 14:41:51 -06:00
Behdad Esfahbod 100576b7b7 [glyf] Start splitting file 2022-06-25 14:38:43 -06:00
Behdad Esfahbod e867ac3aef
Merge pull request #3674 from harfbuzz/use-sinhala-no-hacks
[use] Switch Sinhala to USE
2022-06-25 12:43:04 -06:00
Behdad Esfahbod b1629b0ce0 [gdef] Minor harmless use of HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED 2022-06-25 12:00:25 -06:00
David Corbett 78c5ae3979 [indic] Remove remnants of Sinhala 2022-06-25 13:49:18 -04:00
Behdad Esfahbod 0cc948b96c [use] Switch Sinhala to USE
https://github.com/harfbuzz/harfbuzz/issues/1044
2022-06-25 13:48:43 -04:00
David Corbett 6059828769 [use] Reintroduce the HVM class for U+0DCA 2022-06-25 13:48:43 -04:00
David Corbett 1555b30081 Add U+25CC to lone Robatic but not after U+17D9 2022-06-25 11:02:39 -06:00
David Corbett 0f15cb12de [indic-table] Fix block headers 2022-06-25 11:02:39 -06:00
Garret Rieger 2674962cf5 [repacker] Add comment to graph class. 2022-06-24 17:16:50 -06:00
Garret Rieger 81a2dd0e80 [repacker] Update Makefile for repacker re-org. 2022-06-24 17:16:50 -06:00
Garret Rieger 7078560e33 [repacker] extract graph serialization code into a seperate file. 2022-06-24 17:16:50 -06:00
Garret Rieger 20b02a672d [repacker] Begin splitting up the repacker implementation into several files. 2022-06-24 17:16:50 -06:00
Behdad Esfahbod ad2ab1ddb4 [indic] Clear syllables at the end of GSUB 2022-06-24 11:08:35 -06:00
Behdad Esfahbod 8bfb3e9df2 [indic] Disable vowel-constraints under uniscribe-bug-compatible 2022-06-23 13:28:07 -06:00
Behdad Esfahbod a5cf1a8738 Another null adjustment 2022-06-20 18:01:39 -06:00
Behdad Esfahbod a7960bdfb0 [config] Add HB_NO_LANGUAGE_LONG and enable in TINY profile
Disables 3letter language tags and more complex ones.

Fixes https://github.com/harfbuzz/harfbuzz/issues/3664
2022-06-20 17:55:28 -06:00
Behdad Esfahbod 0d03123350 Mark a null variable as const 2022-06-20 16:51:35 -06:00
Behdad Esfahbod 91d00ab722 [ucd] Update 2022-06-20 13:36:01 -06:00
Khaled Hosny a15ad778fe [arabic-fallback] Generate PUA table from data
Uses packtab for more compact arrays.
2022-06-19 12:29:10 -06:00
Behdad Esfahbod abc0685749
Merge pull request #3063 from harfbuzz/arabic-pua
Arabic PUA shaping
2022-06-19 11:05:17 -06:00
Behdad Esfahbod 7ec4a556d9 [normalize] Cosmetic
I didn't know this syntax is allowed in old C++.
2022-06-19 11:01:45 -06:00
Behdad Esfahbod 8c27c51c27 [arabic-pua] Rename symbols 2022-06-19 10:47:38 -06:00
Behdad Esfahbod 7698962911 [arabic-fallback] Disable PUA shaping under HB_NO_OT_SHAPER_ARABIC_FALLBACK 2022-06-19 10:42:06 -06:00
Behdad Esfahbod 4520911429 [arabic-fallback] Fix warning 2022-06-19 10:42:06 -06:00
Behdad Esfahbod 55350377b0 [cmap/ft] Only map 0xF000 range if font_page is NONE 2022-06-19 10:42:06 -06:00
Behdad Esfahbod 41a079bdec [arabic-fallback] Make win1256 code build again
Humm. Untested.
2022-06-19 10:42:06 -06:00
Behdad Esfahbod 1db6fddb24 [arabic-fallback.hh] Hook up 3-letter ligatures 2022-06-19 10:42:06 -06:00
Behdad Esfahbod 20e9f0b1d2 [arabic-fallback] Add the component loop
Should be able to support 3-letter ligatures now.  Hooking up next.
2022-06-19 10:42:06 -06:00
Behdad Esfahbod 9684d2d8aa [arabic-fallback] More baby steps 2022-06-19 10:42:06 -06:00
Behdad Esfahbod 08715d75e0 [arabic-fallback] Another baby-step 2022-06-19 10:42:06 -06:00
Behdad Esfahbod 15dd34b515 [arabic-fallback] Another minor rename towards supporting 3-letter ligatures 2022-06-19 10:42:06 -06:00
Behdad Esfahbod d86effa4a6 [arabic-fallback] Rename; towards supporting 3-letter ligatures 2022-06-19 10:42:06 -06:00
Behdad Esfahbod 16c2371352 [arabick-fallback] Apply mark ligatures 2022-06-19 10:42:06 -06:00
Khaled Hosny 7f362196c5 [arabic] Split ligature array
Generate marks and 3-component ligatures in separate arrays. The new
arrays are unused currently.
2022-06-19 10:42:06 -06:00
Khaled Hosny 6e29060af2 [arabic] Add mapping files for the PUA encoding
Unused right now.
2022-06-19 10:42:06 -06:00
Khaled Hosny 189e8c326e [ft] Remap legacy Arabic PUA codepoints
Similar to what ot font finctions does, to support Support legacy
pre-OpenType Windows 3.1-era fonts.
2022-06-19 10:42:05 -06:00
Khaled Hosny 69cbd365cc WIP: manually add data entries for PUA ligatures
Just a test, I’m not entirely convinced we should do this.
2022-06-19 10:42:05 -06:00
Khaled Hosny c3f590bb1e [arabic] Support legacy PUA shaping
Support legacy pre-OpenType Windows 3.1-era fonts, by remapping PUA code
points in cmap table and letting our fallback shaper build the GSUB
table.

Uniscribe applies also mset-like substitution, but our fallback mark
positioning gives better results, so this is not implemented.
2022-06-19 10:42:05 -06:00
Behdad Esfahbod b172f88c7d Fix a warning
D:\a\harfbuzz\harfbuzz\src\hb-bit-set-invertible.hh(83): warning C4805: '^': unsafe mix of type 'uint32_t' and type 'const bool' in operation
[870/1075] Compiling C++ object src/harfbuzz.dll.p/hb-face.cc.obj
cl : Command line warning D9025 : overriding '/EHs' with '/EHs-'
cl : Command line warning D9025 : overriding '/EHc' with '/EHc-'
2022-06-18 14:00:59 -06:00
Garret Rieger af74ab452f [repack] always run the sort in repack.
This is needed to ensure virtual link ordering constraints are respected when repack is being called from fontTools. For subset usage, repack won't be called if the graph doesn't already overflow so this change doesn't cause any extra work.
2022-06-16 15:17:58 -06:00
Behdad Esfahbod 29811a720c Fix typo 2022-06-16 14:04:08 -06:00
Behdad Esfahbod c859cbfb88 Mark an array as static
Not sure how this wasn't flagged before.
2022-06-16 13:55:12 -06:00
Behdad Esfahbod 19802dfdf0 Minor rename of static symbols to namespace them 2022-06-16 13:52:47 -06:00
Behdad Esfahbod e0a5231657 [draw] Lazy-allocate user-data/destroy callback vector 2022-06-16 13:40:44 -06:00
Garret Rieger 823f32a0e2 [subset] Fix potential out of bounds write setting overlap flag on composite glyphs. 2022-06-16 12:30:59 -06:00
Behdad Esfahbod 3f9226da37 [meta] Fix typo 2022-06-16 09:28:47 -06:00
Ryan VanderMeulen 1c0eeb7cb3 Don't try to set _USE_MATH_DEFINES if already defined 2022-06-16 09:28:33 -06:00
Ryan VanderMeulen 25917c780f Fix build warning when __GNUG__ isn't defined 2022-06-16 09:28:33 -06:00
Behdad Esfahbod e9c0a74063 Fix clang -Wcomma warnings
Fixes https://github.com/harfbuzz/harfbuzz/issues/3656
2022-06-15 17:28:36 -06:00
Behdad Esfahbod d9c18cc2f0 [indic-table] Update 2022-06-15 16:50:34 -06:00
Behdad Esfahbod 99a26bc19d [indic-generator] Fix typo 2022-06-15 16:15:21 -06:00
Behdad Esfahbod 2cbb775866 [myanmar] Fold category P into GB
Fixes https://github.com/harfbuzz/harfbuzz/issues/3649

This actually now allows Asat after the Myanmar punctuation marks;
something I see in Wikipedia data.
2022-06-15 16:15:21 -06:00
Behdad Esfahbod b350e30186 [myanmar] Remove category D completely
Fixes https://github.com/harfbuzz/harfbuzz/issues/3651
2022-06-15 16:15:21 -06:00
Behdad Esfahbod 8533214ac5 [khmer] Fold category Coeng completely into category H 2022-06-15 16:15:21 -06:00
Behdad Esfahbod 607a9fe793 [indic-like] Remove category duplication 2022-06-15 16:15:21 -06:00
Behdad Esfahbod 0485192195 [indic-like] Remove dependence on ot_category_t 2022-06-15 16:15:21 -06:00
Behdad Esfahbod 14049003ac [indic-like] Reduce indic-dependency of khmer/myanmar even more 2022-06-15 16:15:21 -06:00
Garret Rieger f9f0969cb6 [subset] switch to hb_memcpy. 2022-06-14 17:49:13 +01:00
Garret Rieger 1e34852f07 [subset] Fix undefined behaviour.
Don't memcpy if there's nothing to copy.
2022-06-14 17:49:13 +01:00
Garret Rieger 311413f16b [subset] Fix fuzzer issue.
Fixes https://oss-fuzz.com/testcase-detail/5693568490012672. new_index should be set from new_index2 when the entry is present in the map.
2022-06-14 17:49:13 +01:00
Matthias Clasen 4ba7980b8e Fix the generated gobject headers
These headers are not acceptable to modern compilers.
gcc says things like:

/usr/include/harfbuzz/hb-gobject-enums.h💯1: warning:
  function declaration isn’t a prototype [-Wstrict-prototypes]
  100 | hb_gobject_ot_metrics_tag_get_type () G_GNUC_CONST;
2022-06-11 23:47:00 +01:00
Ali Chraghi 79bb3b5278 [docs] fix typo 2022-06-11 13:04:55 +01:00
Behdad Esfahbod 98116e5cf5 [myanmar] Fix comments on categories
https://github.com/harfbuzz/harfbuzz/pull/3648#discussion_r894955430
2022-06-11 03:42:36 -06:00
Behdad Esfahbod 02016914b3 [indic-generator] Remove unnecessary Myanmar category=D overrides
https://github.com/harfbuzz/harfbuzz/pull/3648#discussion_r894685106
2022-06-10 17:24:19 -06:00
Behdad Esfahbod 937c878078 [indic-generator] Remove unnecessary override for Myanmar U+1039
https://github.com/harfbuzz/harfbuzz/pull/3648#discussion_r894762535
2022-06-10 17:20:15 -06:00
Behdad Esfahbod 9504037ccb [indic-generator] Remove three unneeded Myanmar overrides U+AA74-6
These three characters have Indic_Syllabic_Category=Consonant_Placeholder. The
original evidence that prompted these overrides says they can take tone marks.
They are not subjoined: Khamti Shan apparently does not use subjoined
characters at all. Therefore, PLACEHOLDER is good enough and these need not be
overridden to C.

https://www.unicode.org/L2/L2008/08276-khamti-proposal.pdf

https://github.com/harfbuzz/harfbuzz/pull/3648#discussion_r894640713
2022-06-10 17:13:16 -06:00
Behdad Esfahbod 02eb6606d7 [indic-generator] Remove redundant PLACEHODER characters overrides
https://github.com/harfbuzz/harfbuzz/pull/3648#discussion_r894631922
2022-06-10 17:10:42 -06:00
Behdad Esfahbod e16669ceac [indic-generator] Remove redundant override of U+2010 / U+2011
https://github.com/harfbuzz/harfbuzz/pull/3648#discussion_r894630596
2022-06-10 17:05:35 -06:00
Behdad Esfahbod bb255cd9a6 [indic-generator] Remove redundant override of U+0980
https://github.com/harfbuzz/harfbuzz/pull/3648#discussion_r894627064
2022-06-10 17:03:52 -06:00
Behdad Esfahbod 30d8c87d01 [myanmar] Document Medials
https://github.com/harfbuzz/harfbuzz/pull/3648#discussion_r894532676
2022-06-10 16:56:15 -06:00
Behdad Esfahbod e1826c3714 [khmer] Reuse OT_H for OT_Coeng
https://github.com/harfbuzz/harfbuzz/pull/3648#discussion_r894517417
2022-06-10 16:53:11 -06:00
Behdad Esfahbod eb2f2e318a [indic-generator] Update comment re U+104E
https://github.com/harfbuzz/harfbuzz/pull/3648#pullrequestreview-1002150048
2022-06-10 16:47:59 -06:00
Behdad Esfahbod 0daafefdd1 Merge branch 'main' into indic-cleanup 2022-06-10 10:55:49 -06:00
Behdad Esfahbod 148283d0e0 [syllabic] Use a buffer scratch-flag for has-broken-syllable 2022-06-10 07:48:39 -06:00
Behdad Esfahbod 6997d10bc0 [arabic] Remove a couple TODO items 2022-06-10 07:43:33 -06:00
Behdad Esfahbod e1575f2347 [iter] Remove a few TODO items 2022-06-10 07:41:39 -06:00
Behdad Esfahbod 689c77530a [buffer] Actually remove TODO item
In reality, one side is smaller and one side is larger. The existing code
handles that just fine.
2022-06-10 07:37:45 -06:00
Behdad Esfahbod d09e962b9f [buffer] Update a TODO item 2022-06-10 07:36:43 -06:00
Behdad Esfahbod b3f689e7e5 [serializer] Remove TODO that's not gonna happen 2022-06-10 07:31:47 -06:00
Behdad Esfahbod 10a8cc28fc [normalizer] Remove a TODO that's not going to happen 2022-06-10 07:31:06 -06:00
Behdad Esfahbod 7635568f29 [font] Remove a TODO item that's not gonna happen 2022-06-10 07:29:15 -06:00
Behdad Esfahbod bd453de757 [unicode] Accept a couple hacks as permanent 2022-06-10 07:25:48 -06:00
Behdad Esfahbod 39c132a62d [indic/myanmar] Simplify compare functions 2022-06-10 07:12:39 -06:00
Behdad Esfahbod a5bcd8567f [indic] Update comment re category listing 2022-06-10 07:03:02 -06:00
Behdad Esfahbod 10a5485136 [indic/myanmar] Move is_consonant to .cc files 2022-06-10 06:34:56 -06:00
Behdad Esfahbod 1c657460ef [indic] Expand MEDIAL_FLAGS 2022-06-10 06:29:45 -06:00
Behdad Esfahbod 9e3917f6d6 [indic] Move a couple of functions to .cc file 2022-06-10 06:26:26 -06:00
Behdad Esfahbod 165ef55e57 [indic-generator] Move INDIC_COMBINE_CATEGORIES here 2022-06-10 06:20:10 -06:00