Behdad Esfahbod
d8292b8446
[CFF] Fix parsing of empty Index
...
https://github.com/harfbuzz/harfbuzz/issues/3545#issuecomment-1111047941
2022-04-27 12:38:35 -06:00
David Corbett
6454cec085
[USE] Classify U+10A38 as CONS_MOD_BELOW
2022-04-24 11:41:32 -06:00
Khaled Hosny
f7aee78e90
4.2.1
2022-04-24 05:47:57 +02:00
Behdad Esfahbod
6695bf0560
[gsubgpos] Remove wrong condition in Context application
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3545
2022-04-22 13:48:41 -06:00
Behdad Esfahbod
8575a8f50c
Add _hb_codepoint_is_regional_indicator()
2022-04-21 11:15:34 -06:00
Behdad Esfahbod
c1ee7d28f3
Typo
...
Co-authored-by: Khaled Hosny <khaled@aliftype.com>
2022-04-21 11:15:34 -06:00
Behdad Esfahbod
4d48fae4f2
Enforce Regional_Indicators native direction to LTR
...
And undo the morx direction reversal change introduced in
https://github.com/harfbuzz/harfbuzz/pull/3315
23159084b4
This fixes original bug https://github.com/harfbuzz/harfbuzz/issues/3314
And the reversion in morx code fixes regressions:
https://github.com/harfbuzz/harfbuzz/issues/3528
https://github.com/harfbuzz/harfbuzz/issues/3535
Supersedes:
https://github.com/harfbuzz/harfbuzz/pull/3529
2022-04-21 11:15:34 -06:00
Behdad Esfahbod
a85461b9b6
Add link to Context LookupFlag discussion
...
https://github.com/harfbuzz/harfbuzz/discussions/3538
2022-04-20 12:13:40 -06:00
Simon Cozens
9e59c401e0
[myanmar] Reword confusing comment about masks
2022-04-20 11:25:15 -06:00
Behdad Esfahbod
903cf8cfce
[check-static-inits] Unbreak test
2022-04-13 15:31:51 -06:00
Behdad Esfahbod
ec925ece05
[khmer] Reinstate a pause after basic features
...
This was removed as part of 044d7a06db
,
which caused the regression. Just adding a pause fixes the shaping.
Debugged by just tracing the good/bad shaping and observing the
lookup orders intermingling in the bad shaping.
Test:
hb-shape LeelawUI.ttf --unicodes U+1780,U+17D2,U+179A,U+17BB
Fixes https://github.com/harfbuzz/harfbuzz/issues/3531
2022-04-13 11:54:08 -06:00
Khaled Hosny
88bb746b42
[blob] Return nullptr from create_from_file_or_fail
...
Fix a couple of cases where it would return empty blob, possibly
missed in bdfed8f113
.
2022-04-01 02:38:23 +02:00
Behdad Esfahbod
b179d357a9
[main] Fix unused-variable warnings
2022-03-30 12:59:52 -06:00
Khaled Hosny
9d5730b958
4.2.0
2022-03-30 15:08:34 +02:00
Behdad Esfahbod
044d7a06db
[indic-like] Add per-lookup per-syllable flag
...
This allows mix-and-matching per-syllable and other lookups.
In fact, removes the clear-syllables call completely.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3513
2022-03-28 17:39:54 -06:00
Behdad Esfahbod
61486746d3
Revert "[indic] Clear syllables before presentation features"
...
This reverts commit 90f09b1e87
.
This regressed Indic shaping. See:
https://github.com/harfbuzz/harfbuzz/issues/3513
2022-03-28 15:57:07 -06:00
Behdad Esfahbod
e8f3397f4e
[matcher] Simplify syllable initialization
2022-03-28 13:23:37 -06:00
Behdad Esfahbod
94f5c630fc
[aat] Remove morx deleted-glyphs before GPOS processing
...
Fixes new Apple Color Emoji glyphs sequences rendering.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3512
2022-03-28 13:10:56 -06:00
David Corbett
0dcbdbde9c
[indic] Categorize U+0D04 as Consonant_Placeholder
2022-03-26 21:02:08 -06:00
Behdad Esfahbod
a665e29ed7
[use] Avoid O(n^2) in the machine
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3502
2022-03-25 15:17:55 -06:00
Behdad Esfahbod
ccd9161bfd
[apply-lookup] Try to fix the logic for contextual lookups
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1611
Notably, this fixes Myles's AdditionFont:
https://litherum.blogspot.com/2019/03/addition-font.html
Test with AdditionFont, eg.:
$ util/hb-view AdditionFont.otf =1112112+1113134=
2022-03-25 15:14:40 -06:00
Behdad Esfahbod
fa15fc44bb
[subset] Require exact harfbuzz version in .pc file
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1446
2022-03-25 15:00:36 -06:00
Behdad Esfahbod
b619b05f39
[subset] Adjust name in .pc file
2022-03-25 15:00:36 -06:00
Khaled Hosny
1229078660
[set] Fix annotation
2022-03-25 22:41:25 +02:00
Behdad Esfahbod
3a78cf92c8
[gvar] Fix decoding of private vs shared points
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3506
2022-03-25 13:25:28 -06:00
Behdad Esfahbod
a02fb4a0dc
[glyf] Don't bail rendering glyf even if gvar failed
...
Part of https://github.com/harfbuzz/harfbuzz/issues/3506
2022-03-25 13:25:28 -06:00
Behdad Esfahbod
0a38878549
[set] Minor touch-up on the previous commit
2022-03-25 09:42:36 -06:00
Andrew John
0182988229
[set] Add call to export set contents to an array. ( #3500 )
...
[set] Add hb_set_next_many.
2022-03-25 09:36:44 -06:00
aneejit1
a55a42444d
Meson build writes to the source directory (issue #3507 ) ( #3508 )
...
Don't write to source directory if files did not change
Remove writes to the source directory which cause a meson build failure
if the source directory is read-only.
https://github.com/harfbuzz/harfbuzz/pull/3508
2022-03-24 14:16:41 -06:00
Behdad Esfahbod
bf2a845a17
[ot-layout] Comment
2022-03-24 13:09:53 -06:00
Behdad Esfahbod
a792e16e48
[ot-layout] Change max nesting level of lookups from 6 to 64
2022-03-24 13:08:51 -06:00
Garret Rieger
444c2375a1
[reorg] Use relative includes for hb-ot-layout-gsubgpos.hh
2022-03-23 18:05:24 -06:00
Garret Rieger
b342adeb96
[reorg] Move GSUB into OT::Layout::GSUB namespace.
2022-03-23 18:05:24 -06:00
Garret Rieger
a9910e258f
[reorg] Move SubstLookup and GSUB into the new layout.
2022-03-23 18:05:24 -06:00
Garret Rieger
90af2143d5
[reorg] Move ReverseChainSingleSubst to new layout.
2022-03-23 18:05:24 -06:00
Garret Rieger
403feb3804
[reorg] Move LigatureSubst to new layout.
2022-03-23 18:05:24 -06:00
Garret Rieger
6a369389d6
[reorg] Move AlternateSubst to new layout.
2022-03-23 18:05:24 -06:00
Garret Rieger
dea0681db2
[reorg] Move MultipleSubst into new layout.
2022-03-23 18:05:24 -06:00
Behdad Esfahbod
7243bf3e41
[reorg] Use relative include
2022-03-23 18:05:24 -06:00
Behdad Esfahbod
c180f93766
[reorg] Move sanitize/dispatch and size macros to top
2022-03-23 18:05:24 -06:00
Garret Rieger
f577d02f4a
[reorg] Fix check-* scripts to work with sources files in directories.
2022-03-23 18:05:24 -06:00
Garret Rieger
3ef180db44
[reorg] Move SingleSubst opentype fields to top of the classes.
2022-03-23 18:05:24 -06:00
Garret Rieger
7dfd9e7001
[reorganization] WIP move single substitution into separate files.
2022-03-23 18:05:24 -06:00
Khaled Hosny
c36844d6d9
4.1.0
2022-03-23 07:20:59 +02:00
Behdad Esfahbod
d35c73cd37
[buffer] Whitespace
2022-03-22 13:09:50 -06:00
Behdad Esfahbod
1449498e1d
[ot-font] Vertically center glyph in vertical writing fallback
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/537
2022-03-21 21:40:07 -06:00
Behdad Esfahbod
bf03d7e962
[ot-font] Use ascent+descent for fallback vertical advance
...
This matches what FreeType does.
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/537
2022-03-21 21:27:31 -06:00
Behdad Esfahbod
df42d28d18
[hmtx] Change default advance for horizontal direction to upem/2 again
2022-03-21 21:17:15 -06:00
Behdad Esfahbod
6d0e67dee0
[ot-font] Only use vmtx side-bearing if table exists
...
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/537
2022-03-21 21:07:28 -06:00
Behdad Esfahbod
f41945e313
[cmap] In collect_unicodes() of format 12/13, limit to max Unicode
...
Fixes fuzzer timeout:
https://oss-fuzz.com/testcase-detail/5062368881672192
2022-03-21 18:24:30 -06:00
Behdad Esfahbod
03085132ba
[buffer] Fix out-buffer under memory-alloc failure
...
This was broken in July refactoring of the buffer, and exposed to
ReverseChainSingleSubstFormat1 in 3807061d63
Fixes:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38800
https://bugs.chromium.org/p/chromium/issues/detail?id=1303552
2022-03-21 18:09:06 -06:00
Khaled Hosny
116cc69236
[set] Fix documentation
2022-03-22 00:15:23 +02:00
Behdad Esfahbod
90f09b1e87
[indic] Clear syllables before presentation features
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3488
2022-03-21 15:42:08 -06:00
Behdad Esfahbod
4289684cdb
[set] Fix-up previous commits
2022-03-21 15:37:05 -06:00
Andy John
1176620ba4
Move fn, fix doc.
2022-03-21 15:32:59 -06:00
Andy John
7d802994be
Remove null checks.
2022-03-21 15:32:59 -06:00
Andy John
ef588ea97b
Add option to insert a sorted arrays of values to sets.
2022-03-21 15:32:59 -06:00
Andy John
7a1e79c3ba
Fix typo.
2022-03-21 14:34:22 -06:00
Andy John
4ee00f943f
Use bit shifting instead of multiplying and dividing.
2022-03-21 14:34:22 -06:00
Andy John
3125f5ae33
Add log base 2 versions of constants.
2022-03-21 14:34:22 -06:00
Behdad Esfahbod
1ffe637a0e
[coretext] Remove dead code
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3484
2022-03-21 10:37:42 -06:00
TheBluuDot
7bdc20ec81
restores unintended addition in 43be5ba
...
restores two lines in restore in _hb_allocate_lig_id function that were unintentionally deleted in 43be5ba
2022-03-19 15:12:25 -04:00
Qunxin Liu
7cb002cb58
[subset] bug fix in prune_langsys
...
we should not cache visited langsys cause 2 different Record<Langsys>
could have different Tag while pointing to the same Langsys, a langsys
is redundant in Record<Langsys> A does not mean it's redundant in Record
B. Same thing for visited_script.
Also adding the number of features in the LangSys's feature list to the
visited langsys count so it's more accurate.
Plus some improvement in langsys compare()
2022-03-16 13:08:13 -06:00
Behdad Esfahbod
cad2fe8e63
[baseline] Fix HB_NO_METRICS build
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3482
2022-03-15 10:49:29 -06:00
Behdad Esfahbod
a8a89b80b4
[layout] Whitespace
2022-03-15 10:48:03 -06:00
Behdad Esfahbod
21f5ef56f5
[metrics] Simplify x-height fallback
2022-03-15 10:45:50 -06:00
Behdad Esfahbod
6bf8f0a38f
[baseline] Use ot-metrics fallback API
2022-03-15 10:44:41 -06:00
Dominik Röttsches
965cf1d665
Make load_num_glyphs_from_loca conditional on HB_NO_BORING_EXPANSION
...
Fixes build errors complaining about this function being unused.
2022-03-14 15:16:35 +02:00
David Corbett
49fb8f9072
[USE] Treat visible viramas like dependent vowels
2022-03-13 14:45:27 -06:00
Khaled Hosny
1f79ba9407
4.0.1
2022-03-11 20:19:04 +02:00
Qunxin Liu
a35757c6bc
[repacker] expose hb_subset_repack() API, hb_object_t and hb_link_t structs
2022-03-10 17:26:20 -07:00
Matthias Clasen
e7ab42b246
[layout] Fix handling of baseline variations
...
For BASE table format 1.1, the handling of design
space vs user space coordinates was inconsistent.
We were applying design -> user transformation
twice for the deltas, leading to wrong baseline
values.
Patch by Ebrahim Byagowi <ebrahim@gnu.org>
Fixes : #3476
2022-03-10 09:29:56 -07:00
David Corbett
e5707a440c
Update IANA Language Subtag Registry to 2022-03-02
2022-03-08 13:28:25 -07:00
David Corbett
13bb46cfd5
[USE] Remove obsolete overrides
2022-03-06 16:04:18 -07:00
David Corbett
c33468d48e
[USE] Treat all gc=Cn as independent clusters
2022-03-06 10:44:37 -07:00
David Corbett
e497a8f142
[USE] Remove obsolete symbol/punctuation overrides
2022-03-06 10:44:37 -07:00
David Corbett
854219e056
[USE] Simplify `not_ccs_default_ignorable`
2022-03-06 10:44:37 -07:00
David Corbett
6e059a46b7
[USE] Allow any non-numeric tail in symbol cluster
2022-03-06 10:44:37 -07:00
David Corbett
5b0a59812d
[USE] Restore the category WJ
2022-03-06 10:44:37 -07:00
Florian Pircher
05b3bdb0b3
[aat] Update OT to AAT mappings for hist and vrtr
2022-03-05 20:36:40 -07:00
luz paz
cf3a0f7ab5
Fixed various misc. typos
...
Found via `codespell -q 3 -S ./perf/texts -L actualy,als,ba,beng,clen,crasher,dependant,eachother,fo,gir,inout,ist,nd,ned,ot,pres,ro,statics,te,teh,timne`
2022-03-06 04:59:24 +02:00
Khaled Hosny
8d1b000a3e
4.0.0
2022-03-01 21:27:32 +02:00
Khaled Hosny
6e466256e4
[doc] Typo
2022-03-01 12:01:18 +02:00
Garret Rieger
f6071c16b0
[subset] Rename codepoint -> unicode in subset plan api
2022-02-28 23:45:40 +02:00
Khaled Hosny
1b5a2e0809
[doc] Various fixes to newly added documentation
2022-02-28 10:11:42 -07:00
Behdad Esfahbod
222301bfa4
Merge pull request #3429 from harfbuzz/external_plan
...
[subset] expose subset plan in public subsetting API
2022-02-24 12:55:01 -07:00
Behdad Esfahbod
651c280d0b
[style] Move the negation into the constant
2022-02-18 18:21:46 -06:00
Matthias Clasen
16b232be0e
[hb-style] Fix the sign of slant ratios
...
We want negative slant angles to yield
positive slant ratios. Fix that.
Test included.
2022-02-18 18:10:34 -06:00
Matthias Clasen
e76061a737
[hb-style] Fix synthetic slant values
...
When reporting the slant ratio of a font
that has synthetic slant set, we were
reporting twice the expected value.
Fix that. Test included.
2022-02-18 17:53:54 -06:00
Behdad Esfahbod
56f11ec938
[buffer] Add HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3454
2022-02-18 17:52:27 -06:00
Garret Rieger
fc1548cf71
[subset] document return values.
2022-02-17 17:16:31 -08:00
Matthias Clasen
f6efe34f5e
[ot-metrics] Synthesize missing metrics
...
Add a variant of hb_ot_metrics_get_position that
synthesizes missing values.
New api: hb_ot_metrics_get_position_with_fallback
2022-02-17 18:34:59 -06:00
Behdad Esfahbod
f8e9e315bb
Merge pull request #3437 from matthiasclasen/synthesize-missing-baselines
...
[BASE] Synthesize missing baselines
2022-02-17 14:34:46 -06:00
Behdad Esfahbod
8e900f2cda
Revert "hb-algs.hh: Fix build on Visual Studio 2015"
...
This reverts commit 52c536bb8d
.
See https://github.com/harfbuzz/harfbuzz/pull/3448
2022-02-17 13:29:04 -06:00
Matthias Clasen
95bb2ff719
[ot-layout] Add central baselines
...
Add HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_CENTRAL
and HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_CENTRAL
which are the centers of the ideographic em-box
and face box.
2022-02-16 17:37:35 -06:00
Matthias Clasen
f81578fd86
[ot-layout] Synthesize missing baselines
...
Add a variation of hb_ot_layout_get_baseline that
synthesizes missing baselines, using heuristics in part
taken from the CSS Inline Layout Module, Level 3.
Includes some new tests for synthesized baselines.
The base2.ttf is a subset of Noto Sans Bengali that
includes just the Bengali Ka.
New API: hb_ot_layout_get_baseline_with_fallback
2022-02-16 17:37:33 -06:00
Behdad Esfahbod
5de67c8961
[ot-layout] Remove commented-out prototypes
...
Not gonna happen.
2022-02-16 17:08:19 -06:00
Behdad Esfahbod
d2998faad3
Merge pull request #3410 from harfbuzz/boring-expansion
...
[Boring Expansion] >64k loca & hmtx tables
This does two things:
The num-glyphs reported by the face now is the maximum reported by the maxp and that deduced from the length of the loca table; I think this is the right thing to do anyway; According to OpenType such loca tables are invalid.
The interpretation hmtx tables that have excessive bytes at the end, again, invalid according to OpenType, has changed. Previously we were interpreting those excessive bytes as extra lsb values. Now we interpret them as extra advance values, the last of which is repeated for all missing glyphs. Again, these are tables that are invalid according to OpenType, and the advances are for glyph indices beyond maxp table's num-glyphs.
The combined effect is that the font can have shapes and advances for gid's beyond the maxp limit of 64k. In fact, maxp table becomes optional.
2022-02-16 14:37:09 -06:00
Behdad Esfahbod
98079109e6
[ot-layout] Add +hb_ot_layout_get_horizontal_baseline_tag_for_script()
...
New API:
+hb_ot_layout_get_horizontal_baseline_tag_for_script()
2022-02-16 13:54:22 -06:00
Matthias Clasen
9909e33268
Improve docs for hb_ot_layout_get_ligature_carets
...
Add some relevant details to the documentation
for this function.
Fixes : #3168
2022-02-15 18:48:54 -06:00
Behdad Esfahbod
a396543ae1
Merge pull request #3411 from harfbuzz/draw
...
[draw] Finish and release draw API
2022-02-15 18:47:55 -06:00
Behdad Esfahbod
f567b55619
[face] Use max numGlyphs of maxp and loca
2022-02-15 18:26:43 -06:00
Behdad Esfahbod
c8fd8c1337
[ot-face] Use core tables
2022-02-15 18:13:44 -06:00
Behdad Esfahbod
2a430790ad
[machinery] Add "core table" machinery
...
To be used in subsequent commit; or tried anyway.
2022-02-15 17:53:33 -06:00
Behdad Esfahbod
67eb9acf79
[config] Add HB_NO_BORING_EXPANSION
2022-02-15 17:17:49 -06:00
Behdad Esfahbod
8b7ccc41c4
[hmtx] Implement [boring-expansion] >64k expansion
...
This implements https://github.com/be-fonts/boring-expansion-spec/issues/7
2022-02-15 14:15:12 -06:00
Behdad Esfahbod
431c948ed7
[hmtx] Document
2022-02-14 14:13:04 -06:00
Behdad Esfahbod
be4ddcc30b
[hmtx] Rename internal num_advances to num_long_metrics
2022-02-14 14:12:07 -06:00
Behdad Esfahbod
622cbc485f
[hmtx] Internal rename num_metrics to num_bearings
2022-02-14 14:09:40 -06:00
Behdad Esfahbod
ed6d287d11
[ot-face] Load num-glyphs from `loca` table before `maxp`
...
Implements [boring-expansion] [maxp] Relax
https://github.com/be-fonts/boring-expansion-spec/issues/6
2022-02-14 13:52:30 -06:00
Behdad Esfahbod
93962977bc
Remove return of void
2022-02-13 19:38:59 -06:00
Ebrahim Byagowi
d4588204e5
[draw/glyf] Emit empty contours
...
This makes it actually match freetype behaviour even though rasterizer
should filter such contours specially for stroking.
See https://github.com/harfbuzz/harfbuzz/pull/3411#discussion_r802283827 for the context.
2022-02-13 23:50:53 +03:30
Behdad Esfahbod
94517850dd
[algs] Fix typo in hb_pair_t conversion operator
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2083
2022-02-13 13:39:26 -06:00
Khaled Hosny
f942874fac
[draw] Fix some introspection warnings
2022-02-13 13:21:15 -06:00
Behdad Esfahbod
0858463ac3
[draw/glyf] Don't skip empty contours of size 2
...
See:
https://github.com/harfbuzz/harfbuzz/pull/3411#discussion_r804988217
2022-02-13 13:21:15 -06:00
Behdad Esfahbod
57aa8c3b3a
[draw] Another try at a stable draw moveto semantic
2022-02-13 13:21:15 -06:00
Behdad Esfahbod
151f205819
[draw] Emit move_to immediately, like other operators
2022-02-13 13:21:15 -06:00
Khaled Hosny
628847b5c8
[doc] Link to respective draw callback functions
2022-02-13 13:21:14 -06:00
Khaled Hosny
7245298e25
[doc] Document HB_DRAW_STATE_DEFAULT
2022-02-13 13:21:14 -06:00
Khaled Hosny
8e892bdb54
[doc] Message draw documentation a bit
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
cdf1cb35db
[draw] Destroy callback data
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
c56c13756b
[draw] Document more
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
2376230523
[draw] Flesh out docs a bit
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
bc6c3b8401
[font] Update get_glyph_shape() doc
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
732c749ef7
[font] Adjust synthetic-slant docs
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
59067db9f4
[font/draw] Slant drawings
...
Need to update hb_font_set_synthetic_slant() docs now that we do this.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
aa5c7a3811
[draw-session] Add slant
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
4f2704adb6
[draw] Add more reserved items to hb_draw_state_t
...
Since these are free basically.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
2ce19f2868
[font/draw] Fetch shape from parent font if not implemented in font
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
d6b61dff95
[draw] Minor cleanup
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
6d5b998f25
[ft/draw] Implement hb-draw for hb-ft
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
370bec938b
[draw] Rename internal draw_session_t to hb_draw_session_t
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
a357e5d889
[draw] Do quadratic-to-cubic conversion in nil quadratic implementation
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
c681331c3f
[draw] Rename internal draw_helper_t to draw_session_t
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
f1a9a9ccaf
[draw-state] Pass state down to callbacks
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
a9dd9f0bae
[draw] Add public move_to/line_to/... API that take a draw-state
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
ebc2a133c3
[draw] Rename internal methods
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
86fcd4fe98
[draw] Simplify start_path
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
1740916ede
[draw] Remove check for no-op
...
This is unnecessary overhead. Up to rasterizers to handle this. Plus,
this throws off point-numbers in uses that rely on it.
Disabled one test that broke with this.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
fc78592e67
[draw-state] Add type and use in draw-helper
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
a755f93e8d
[draw] Add TODO
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
cdb1a1fc06
[draw] Add REPLACEME
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
8b4f429000
[draw] Virtualize hb_font_draw_glyph() into hb_font_get_glyph_shape()
...
To be implemented in hb-ft.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
92e6e53b30
[draw] Rename user_data to draw_data
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
3b915389b5
[draw] Remove unneeded roundf() calls
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
2bed4f46fb
[draw] Fix draw signatures
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
e0ac6c587b
Remove remaining traces of HB_EXPERIMENTAL_API
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
27dfd69fc7
[draw] Another Since: tag update
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
7ac23f4e78
[draw] Whitespace
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
e157b50345
[draw] Remove return value of hb_font_draw_glyph()
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
ddc36df332
[draw] Move hb_font_draw_glyph() to hb-draw-glyph.cc
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
9a1508a2be
[draw] Replace API Since tags with REPLACEME
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
a428c1193c
[main] Fix compiler warnings
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
35190dc961
[draw] Convert API to float instead of hb_position_t
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
d6e49b8278
[font] Add em_fscalef_[xy] That take and return float
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
6c0b65a6a8
[font] Add em_scaleff() that returns float
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
dd7b6e2c3f
[draw] Remove EXPERIMENTAL_API tag
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
7af165dbf0
Fix compiler warning
2022-02-12 21:25:36 -06:00
Khaled Hosny
0a12996134
3.4.0
2022-02-13 00:30:50 +02:00
Khaled Hosny
41815a0d63
[name] Extraneous (out) annotation in return value
2022-02-13 00:00:01 +02:00
Behdad Esfahbod
b263371b09
Merge pull request #3398 from harfbuzz/buffer-verify
...
Add HB_BUFFER_FLAG_VERIFY
2022-02-12 15:06:47 -06:00
Behdad Esfahbod
42b119edb5
[hmtx] Remove other subset-specific method from hmtx accelerator
2022-02-12 14:22:35 -06:00
Behdad Esfahbod
9ba520b5d1
[hmtx] Remove one subset-specific method from hmtx accelerator
...
Looks ugly but is the right thing to do.
2022-02-12 14:22:35 -06:00
Garret Rieger
27a6c895ba
[subset] Fix memory leak in plan creation.
2022-02-11 16:19:43 -08:00
Garret Rieger
670ef070bd
[subset] Change subset plan create to be or_fail.
2022-02-11 16:01:33 -08:00
Garret Rieger
ae8d373bcf
[subset] add subset plan reference, set/get user data functions.
2022-02-11 14:54:23 -08:00
Garret Rieger
b65e48a786
[subset] Add subset plan to public API.
...
Add the ability to create a subset plan which an be used to gather info on things like glyph mappings in the final subset. The plan can then be passed on to perform the subsetting operation.
2022-02-11 14:37:21 -08:00
Behdad Esfahbod
6893723879
[machinery] Allow using lazy-loader with void*
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3427
2022-02-11 14:28:51 -06:00
Chun-wei Fan
52c536bb8d
hb-algs.hh: Fix build on Visual Studio 2015
...
The compiler does not recognize the std::hash call on
hb_decay<decltype (hb_deref (v)>, so give it a shove so that it is recognized
there.
2022-02-10 13:26:56 -06:00
Alexis King
81754a5a96
[ot-math] Add hb_ot_math_get_glyph_kernings
...
closes #3396
2022-02-09 12:03:07 -06:00
Alexis King
1bc4bad7a5
[ot-tag] Add HB_SCRIPT_MATH (Zmth) and map it to OT ‘math’ tag
...
The ISO 15924 code for mathematical notation is ‘Zmth’, but the
OpenType script is ‘math’.
2022-02-08 12:40:15 -06:00
Khaled Hosny
76cd8a4737
[arabic] Update to AMTRA revision 6
...
https://www.unicode.org/reports/tr53/tr53-6.html#Modifications
2022-02-08 12:38:51 -06:00
Khaled Hosny
ac46c3248e
3.3.2
2022-02-06 15:41:18 +02:00
Behdad Esfahbod
88798ee8be
[GPOS] Disable split-kerning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3408
Reverts https://github.com/harfbuzz/harfbuzz/pull/3235
Fixes https://github.com/harfbuzz/harfbuzz/pull/3235#issuecomment-1029814978
2022-02-04 19:01:57 -06:00
Behdad Esfahbod
9177953720
[atexit] Allow hb_atexit redefinition
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3412
2022-02-04 12:38:45 -06:00
Behdad Esfahbod
8670ffbf4c
[buffer] Comment
2022-02-03 11:19:23 -06:00
Behdad Esfahbod
e59da2871a
[glyf] Don't store face in accelerator
2022-02-01 16:32:39 -06:00
Khaled Hosny
45df259538
3.3.1
2022-01-31 23:06:10 +02:00
Garret Rieger
4e2f409bce
[subset] Don't hold references to members of the active_glyph_stack.
...
These references may get invalidated after the vector for the stack is resized. Fixes: https://oss-fuzz.com/testcase-detail/5422577634377728
2022-01-31 22:58:53 +02:00
Khaled Hosny
98da330638
3.3.0
2022-01-31 18:39:06 +02:00
David Corbett
ae9afd9772
Let BCP 47 tag "mo" fall back to OT tag 'ROM '
2022-01-30 14:32:59 -05:00
David Corbett
a184c5f851
Don’t always inherit from macrolanguages
...
If an OpenType tag maps to a BCP 47 macrolanguage, that is presumably to
support the use of the macrolanguage as a vague stand-in for one of its
individual languages. For example, "ar" and "zh" are often used for
"arb" and "cmn". When the OpenType tag maps to a macrolanguage and some
but not all of its individual languages, that indicates that the
OpenType tag only corresponds to the listed individual languages (which
may be referred to using the macrolanguage subtag) but not the missing
individual languages. In particular, INUK (Nunavik Inuktitut) is mapped
to "ike" (Eastern Canadian Inuktitut) and "iu" (Inuktitut) but not to
"ikt" (Inuinnaqtun), so "ikt" should not inherit the INUK mapping from
its macrolanguage "iu".
2022-01-30 13:28:23 -05:00
Behdad Esfahbod
b47b3b9972
[fallback-kern] Move buffer message to correct position
2022-01-29 10:24:38 -07:00
Behdad Esfahbod
e986c12075
[verify] Show buffer input text when verification fails
2022-01-29 09:08:48 -07:00
Behdad Esfahbod
3972e0a8f1
[buffer] Whitespace
2022-01-29 08:22:19 -07:00
David Corbett
0b1bf89cc2
Replace “[family]” with “[collection]”
...
Not all language collections are language families.
2022-01-29 10:15:23 -05:00
David Corbett
0e31595e0d
Infer tag mappings for unregistered macrolanguages
...
Every macrolanguage not mentioned in the OT language system tag registry
is mapped to every tag of its individual languages, if those have
registered tags.
2022-01-29 10:15:23 -05:00
David Corbett
5a6545940a
Add the language system tag INUK
2022-01-28 21:29:43 -05:00
Garret Rieger
bc899650c7
[subset] Fix for issue #3397 .
...
cur_intersected_glyphs gets modified during recursion leading to incorrect filtering of sub tables in some cases. So don't use cur_intersected_glyphs. Instead just add an additional entry onto the parent_active_glyphs () stack.
Additionaly expands NotoNastaliqUrdu tests to include coverage of the issue from #3397 .
2022-01-28 14:20:33 -08:00
Garret Rieger
f3c1f4f0da
[subset] convert active_glyphs_stack to be a vector of hb_set_t instead of hb_set_t*.
2022-01-28 14:20:33 -08:00
Behdad Esfahbod
476a6377a5
[buffer] Document HB_BUFFER_FLAG_VERIFY
2022-01-28 15:05:10 -07:00
Behdad Esfahbod
5b1d813b69
[config] Enable HB_NO_BUFFER_VERIFY in HB_LEAN
2022-01-28 13:53:44 -07:00
Behdad Esfahbod
61823838f9
[buffer] Add HB_BUFFER_FLAG_VERIFY
...
Move buffer verification code inside the library, from util/.
Part of https://github.com/harfbuzz/harfbuzz/issues/3010
2022-01-28 13:53:44 -07:00
Behdad Esfahbod
7c704d8982
[buffer] Make hb_buffer_append() take a const argument
2022-01-28 13:53:44 -07:00
Behdad Esfahbod
24650624c8
[font] Fix build with no-var configs
2022-01-28 13:53:21 -07:00
Behdad Esfahbod
91b779e23c
Avoid redefinition of HB_NO_SETLOCALE in certain configs
2022-01-28 13:52:15 -07:00
Khaled Hosny
fa29006bfa
[doc] Fix generation of hb_glyph_flags_t docs
...
GTK-Doc does not like the empty lines here, and interprets everything
after the first empty line as the description of the enum itself not a
specific member and the generated text makes no sense.
Removing the empty lines makes the text harder to read (both in source
and HTML), but at least it is correctly organized.
2022-01-26 19:10:23 -08:00
Behdad Esfahbod
e9cc5f6cdb
Merge pull request #3297 from harfbuzz/unsafe-to-concat
...
Implement UNSAFE_TO_CONCAT flag
2022-01-26 12:23:29 -08:00
Behdad Esfahbod
540af548dc
[unsafe-to-concat] Clarify documentation as per feedback
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/3297#discussion_r754395825
2022-01-25 09:10:56 -07:00
Behdad Esfahbod
bad5c94562
[test] Remove HB_UNUSED
2022-01-23 10:53:19 -07:00
Behdad Esfahbod
6c09a8b5b0
[test-serialize] Assert len
2022-01-23 10:52:13 -07:00
Behdad Esfahbod
76c6f4164f
[test] Add test-serialize
2022-01-23 10:43:37 -07:00
Behdad Esfahbod
3324606492
[buffer] Oops
2022-01-22 15:46:13 -07:00
Behdad Esfahbod
20031ddbb8
[unsafe-to-concat] Mark in all other shapers
...
unsafe_to_break() implies unsafe-to-concat; but setting the flag
manually wasn't.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
6e345f709d
Cosmetic
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
374a6f186d
[fallback-shape] Add buffer trace log
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
bcdfedbc09
[unsafe-to-concat] Mark as unsafe in kern machine
...
Fixes that last test. Yay!
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
14d43d1235
[unsafe-to-concat] Adjust end conditions
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
8663eda4fd
[unsafe-to-concat] More annotations for MarkMarkPos
...
Failures down to one:
265/401 harfbuzz:shaping+aots / lookupflag_ignore_attach FAIL
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
6a7d6d4b64
[unsafe-to-concat] More annotations for MarkLigaturePos
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
a575992057
[unsafe-to-concat] Mark LigatureSubst
...
Failures down to two:
209/401 harfbuzz:shaping+aots / gpos6 FAIL 0.06s exit status 1
265/401 harfbuzz:shaping+aots / lookupflag_ignore_attach FAIL 0.06s exit status 1
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
b443898cce
[unsafe-to-concat] Adjust MarkBasePos
...
A couple more aots tests down. Four failing:
209/401 harfbuzz:shaping+aots / gpos6 FAIL 0.06s exit status 1
261/401 harfbuzz:shaping+aots / gsub4_1_multiple_ligatures FAIL 0.07s exit status 1
265/401 harfbuzz:shaping+aots / lookupflag_ignore_attach FAIL 0.07s exit status 1
267/401 harfbuzz:shaping+aots / lookupflag_ignore_combination FAIL 0.07s exit status 1
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
95d052a791
[unsafe-to-concat] Adjust GPOS lookbacks
...
Fixes Cursive aots test, fails a couple new aots ones.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
909e34f68a
[unsafe-to-concat] Adjust Arabic-joining start boundary condition more
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
11bdd7a020
[unsafe-to-concat] Adjust CursivePos
...
Doesn't fix the test yet.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
ea1b32c8c1
[unsafe-to-concat] Adjust "interior"ness of "from_out_buffer"
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
4f04baef17
[unsafe-to-concat] Further adjust Arabic joining logic at boundary
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
235c3a1295
[unsafe-to-concat] Adjust Arabic joining logic
...
Test failures done one more. Fixed the mongolian-variation-selector
test. Another test case:
$ util/hb-shape NotoSansArabic-Regular.ttf -u 628,200c,628 --show-flags --verify
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
48c5f26199
[unsafe-to-concat] Fix PairPos2 logic
...
Test failures down from 8 to 6:
113/400 harfbuzz:shaping+in-house / mongolian-variation-selector FAIL 0.06s exit status 1
203/400 harfbuzz:shaping+aots / gpos3 FAIL 0.06s exit status 1
204/400 harfbuzz:shaping+aots / gpos4_lookupflag FAIL 0.06s exit status 1
260/400 harfbuzz:shaping+aots / gsub4_1_multiple_ligatures FAIL 0.06s exit status 1
264/400 harfbuzz:shaping+aots / lookupflag_ignore_attach FAIL 0.06s exit status 1
266/400 harfbuzz:shaping+aots / lookupflag_ignore_combination FAIL 0.06s exit status 1
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
c0058892be
[unsafe-to-concat] Mark entire buffer unsafe-to-concat if kerx format2
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
60006d3687
[gsubgpos] Adjust chaining unsafe-to-concat application
...
Fixes three tests.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
d98a0fc88e
[buffer] Consolidate glyph-flags implementation
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
f91ce56e08
[buffer] Add default cluster value in find_min_cluster
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
56d081955c
[buffer] Rename _unsafe_to_break_set_mask to _infos_set_glyph_flags
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
78481b32c0
[gsubgpos] Combine input/backtrack/lookahead unsafe-to-concat
...
I feel like this is correct logic. Still have to prove.
Errors unchanged at 10.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
596bc7e939
[unsafe-to-concat] Add to GPOS kerning
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
e1cbd4539f
[unsafe-to-concat] Add annotations to GPOS and kern
...
Failures from 13 to 14.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
3122c2cdc4
[buffer] Add HB_GLYPH_FLAG_UNSAFE_TO_CONCAT
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1463
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
a8b7f18804
[cff] Initialize accelerator members
2022-01-21 07:38:33 -07:00
Behdad Esfahbod
cce37a6f10
[gpos] Fix conditional
2022-01-21 07:31:21 -07:00
Behdad Esfahbod
773cf4fdd3
[post] Initialize variables
2022-01-21 07:30:09 -07:00
Behdad Esfahbod
84aa1a836c
[PairPos] Split GPOS kerning to both sides ( #3235 )
2022-01-20 14:18:19 -07:00
Behdad Esfahbod
ae9fc7f533
Clean accelerators a bit more
2022-01-20 12:37:21 -07:00
Behdad Esfahbod
0ae6659398
Merge pull request #3392 from harfbuzz/auto-accelerators
...
Auto accelerators
2022-01-20 11:28:59 -08:00
Behdad Esfahbod
ac1bb3e39e
[machinery] Move accelerators to constructor/destructor
2022-01-20 12:10:05 -07:00
Garret Rieger
112cb9fe69
[repacker] Fix missing initilization of obj in vertex_t.
2022-01-20 08:03:52 -08:00
Behdad Esfahbod
e062376ef1
[machinery] Make accelerator lazy-loader call Xinit/Xfini
...
Instead of init/fini. To isolate those functions. To be turned into
constructor/destructors, ideally one per commit (after some SFINAE
foo.)
2022-01-19 17:09:34 -07:00
Behdad Esfahbod
2d12fc90a4
[ms-feature-ranges] Pass reference to cmp function
2022-01-19 14:01:34 -07:00
Behdad Esfahbod
ac109c9353
[ms-feature-ranges] Inline code in header file
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3387
2022-01-19 12:22:02 -08:00
Behdad Esfahbod
376738d411
[coretext] Fix lsearch
2022-01-19 11:58:42 -07:00
Behdad Esfahbod
106388e766
[vector] Merge sorted-vector into vector
...
Was easier than I thought!
Let's see what the bot gods think...
2022-01-19 11:38:37 -07:00
Behdad Esfahbod
294d50ff35
[vector] Add sorted template argument
2022-01-19 11:32:14 -07:00
Behdad Esfahbod
cd9799784c
[vector] Remove old find() method
2022-01-19 11:14:25 -07:00
Behdad Esfahbod
849e40b4db
[ms-feature-ranges] Use preferred vector search API
2022-01-19 11:06:33 -07:00
Behdad Esfahbod
7e160dc347
[gpos] Fix unsafe-to-break of mark-attachment
...
This was undetected because most of the time marks were in same
cluster of their base already.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3093
2022-01-19 09:27:55 -07:00
Behdad Esfahbod
c8195dbc01
Merge pull request #3365 from harfbuzz/gdef-fix
...
GDEF fix
2022-01-19 06:56:05 -08:00
Garret Rieger
94ba4d5a44
[subset] Fix bound check when setting overlap bit.
...
length() shouldn't be used again as the end of instruction offset is already included in flags_offset.
2022-01-18 19:16:37 -08:00
Behdad Esfahbod
fe783ac091
[cff] Remove op_str_t nop init/fini
2022-01-18 13:38:28 -07:00
Behdad Esfahbod
8d24ac2662
[cff] Remove init/fini from number_t
2022-01-18 13:14:42 -07:00
Behdad Esfahbod
6ef83c2c31
[vector] Remove .fini_deep()
2022-01-18 13:08:34 -07:00
Behdad Esfahbod
4eb6e6ea16
[cff] Remove some more fini_deep()
2022-01-18 12:07:05 -07:00
Behdad Esfahbod
29f60d1eaa
[cff] Remove init/fini from blend_arg_t
2022-01-18 11:58:16 -07:00
Behdad Esfahbod
213e3f09b1
[vector] Add TODO Emplace?
2022-01-18 11:53:52 -07:00
Garret Rieger
f1dc8b087c
[subset-cff] Convert subr_closures_t to constructor/destructor instead of init/fini.
2022-01-18 10:29:04 -08:00
Behdad Esfahbod
a48aa9850a
[subset-cff] Remove another set of fini_deep
2022-01-18 09:32:58 -07:00
Behdad Esfahbod
07474aa8c6
[subset-cff1] Remove a constructor/destructor pair
2022-01-18 09:29:43 -07:00
Behdad Esfahbod
a1e9a276eb
[subset-cff2] Drop an constructor/destructor pair
2022-01-18 09:27:32 -07:00
Behdad Esfahbod
035f03346d
[str_buff_vec_t] Remove unused fini method
2022-01-18 09:26:30 -07:00
Behdad Esfahbod
de2cef42b4
[bimap] Remove init/fini
2022-01-18 09:21:31 -07:00
Behdad Esfahbod
c3dd21f110
[cff] Remove unneeded init/fini
2022-01-18 09:11:08 -07:00
Behdad Esfahbod
15cceff3d7
[repacker] Replace fini_deep() with fini()
...
Vector calls destructor now.
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
1198fb2468
[vector] Adjust construction criteria
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
c58bfa35fb
[vector] Move semantics in vector remove()
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
5946e945d5
[vector] Destruct in pop()
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
7171917b52
[vector] Construct items when enlarging
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
813eaba6ea
[vector] Start adding destruction
...
Now we need to remove manual destruction, ouch!
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
65a22836f8
[vector] Add XXX markers for remaining places that need work
2022-01-17 16:46:45 -07:00
Behdad Esfahbod
92f179075f
Make hb_coerce static inline
...
That's the pattern we follow.
985b63b3ee (commitcomment-63973544)
2022-01-16 07:51:35 -07:00
Behdad Esfahbod
19793f333b
Better try at previous commit
...
985b63b3ee (commitcomment-63973544)
2022-01-16 07:49:40 -07:00
Behdad Esfahbod
1173ed1f7f
Try fix Mac build
...
985b63b3ee (commitcomment-63973544)
2022-01-16 07:48:02 -07:00
Behdad Esfahbod
c0f57ccc88
[algs] Add default-construtor to hb_pair_t
2022-01-16 07:01:05 -07:00
luz paz
e2e305066a
Fix various typos
...
Found via `codespell -q 3 -S ./perf/texts -L actualy,ba,beng,fo,gir,inout,nd,ot,pres,ro,te,teh,timne`
2022-01-16 05:39:03 -08:00
Behdad Esfahbod
589bea15b7
Fix previous commit
2022-01-15 17:55:10 -07:00
Behdad Esfahbod
b97e4f7084
Further adjust setlocale
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3375#issuecomment-1013783496
2022-01-15 17:47:51 -07:00
Behdad Esfahbod
63affc4eae
[vector] Move semantics when resizing
2022-01-15 12:24:20 -08:00
Behdad Esfahbod
1c50106608
[meta] Include <memory>, for addressof
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3375
2022-01-15 13:09:06 -07:00
Behdad Esfahbod
71e6f742a8
[meta] Remove unused hb_ref()
2022-01-15 13:09:06 -07:00
Garret Rieger
e30511a8de
[map] Correct previous commit, if (...) was reversed.
2022-01-14 16:48:42 -08:00
Garret Rieger
ff4e8c7eac
[map] Fix bad memory access if hb_map.fini() was called twice.
2022-01-14 16:42:39 -08:00
Behdad Esfahbod
8a69e00639
[meta] Use std::addressof() instead of hb_addressof()
2022-01-13 16:17:34 -07:00
Behdad Esfahbod
b7b0a15f7e
[meta] Remove hb_add_const
2022-01-13 15:33:27 -07:00
Behdad Esfahbod
3b2e604237
[meta] Use std::is_const instead of hb_is_const
2022-01-13 15:32:46 -07:00
Behdad Esfahbod
909dde9df1
[meta] Use std::is_reference instead of hb_is_reference
2022-01-13 15:30:10 -07:00
Behdad Esfahbod
47afb3ef04
[meta] Replace hb_is_pointer with std::is_pointer
2022-01-13 15:27:41 -07:00
Behdad Esfahbod
956e0a4d13
[map] Destruct objects
2022-01-13 15:07:10 -07:00
Behdad Esfahbod
bc0a5fdf43
[test-map] Add disabled tests with std::string
2022-01-13 13:34:22 -07:00
Behdad Esfahbod
985b63b3ee
[map] Allow invalid items to be pointer to static object
...
By derefencing them when necessary.
Also, we do not rely on trivially-copyable, so remove that assertion.
2022-01-13 13:33:07 -07:00
Behdad Esfahbod
98b26eedf5
[check-static-inits] Only check library object files
2022-01-13 13:12:10 -07:00
Behdad Esfahbod
1e27f95dc1
[algs] Add hb_coerce()
2022-01-13 13:10:47 -07:00
Behdad Esfahbod
5a91db1135
[map] Remove constexpr invalid items
...
These were non-workable in the general case, eg std::string.
2022-01-13 12:44:48 -07:00
Behdad Esfahbod
114046dc27
[map] Construct objects
2022-01-13 12:38:26 -07:00
Behdad Esfahbod
ca4f56bdc7
[map] Massage some more
...
Towards being able to store arbitrary types.
2022-01-13 12:18:59 -07:00
Behdad Esfahbod
cfe2b66114
[algs] Fix hash chaining to std::hash()
2022-01-13 12:18:59 -07:00
Garret Rieger
87496bf63e
[subset] fix fuzzer timeout if visisted_paint goes into error.
2022-01-13 11:08:24 -08:00
Khaled Hosny
0acf466c44
[doc] Fix hb_font_set_synthetic_slant param name
2022-01-13 01:29:30 +02:00
Behdad Esfahbod
fa12f1ae25
Rename method
2022-01-12 15:08:34 -07:00
Behdad Esfahbod
9408e0d6d1
Rename variable
2022-01-12 15:07:34 -07:00
Behdad Esfahbod
96c969c820
Preserve glyph props
2022-01-12 15:06:40 -07:00
Behdad Esfahbod
0b2c514fb4
More macro cleanup
2022-01-12 11:20:58 -07:00
Behdad Esfahbod
0a42f46ce9
Fix compiler warning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3364
2022-01-12 11:16:17 -07:00
Matthias Clasen
72f0b24ee3
docs: Clarify variation apis ( #3363 )
...
Make it explicit that the variations setters
replace all existing variations, even if
not all axes are included in the provided
values.
Co-authored-by: Matthias Clasen <mclasen@redhat.com>
2022-01-12 11:08:02 -07:00
Matthias Clasen
befe3b5d5a
color: Document empty returns ( #3362 )
...
Document that the SVG and PNG getters return
the singleton empty blob if the glyph has no
color.
Fixes : #1413
Co-authored-by: Matthias Clasen <mclasen@redhat.com>
2022-01-12 11:07:25 -07:00
Behdad Esfahbod
13643934aa
Clean up HB_NO_SETLOCALE
...
https://github.com/harfbuzz/harfbuzz/pull/3358#pullrequestreview-850500143
2022-01-12 10:54:28 -07:00
Behdad Esfahbod
53847dba92
[algs] Call std::hash from hb_hash()
2022-01-12 10:35:28 -07:00
Behdad Esfahbod
74811c501d
[map] Map == / != use correct types
2022-01-12 10:35:28 -07:00
Behdad Esfahbod
ce7f19a2cc
Revert "[map] Actually use k/v invalid types for declaration!"
...
This reverts commit 6f559346ac
.
Err. My bad.
2022-01-10 14:40:27 -07:00
Behdad Esfahbod
6f559346ac
[map] Actually use k/v invalid types for declaration!
2022-01-10 14:29:36 -07:00
Behdad Esfahbod
a45a630539
Fix unintentional locale dependency ( #3358 )
...
Avoid unintentional locale dependency
hb_variation_to_string uses sprintf with %g, which will produce
a locale-dependent decimal point, which is not desired here.
The output is supposed to be compatible with CSS syntax, and
that always uses '.' for the decimal point.
Fix this by changing the per-thread locale to "C" around sprintf call.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3355
Fixes https://github.com/harfbuzz/harfbuzz/pull/3357
Fixes https://github.com/harfbuzz/harfbuzz/pull/3358
Co-authored-by: Matthias Clasen <mclasen@redhat.com>
2022-01-08 16:47:33 -07:00
Matthias Clasen
d70825a6d1
docs: Add some details about coordinates
...
Mention what the effective values are when
coordinates have not been set.
2022-01-08 06:46:22 -08:00
Behdad Esfahbod
0a5c1c9705
[failing-alloc] Make it compile as C++ as well
2022-01-04 14:18:38 -07:00
Behdad Esfahbod
bea5369c6d
[buffer] Rename swap_buffers() to sync()
2022-01-04 10:52:05 -07:00
Behdad Esfahbod
d1e7df5c3f
[buffer] Add enter()/leave() pair around shape()
2022-01-04 07:32:04 -07:00
Behdad Esfahbod
43be5ba442
[buffer] Group shape-related members together
2022-01-04 07:26:53 -07:00
Behdad Esfahbod
52f5711ed0
[buffer] Add hb_buffer_create_similar()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1555
2022-01-03 11:57:42 -07:00
Behdad Esfahbod
f643b81ffc
[buffer] Clean up internal state bookkeeping
...
hb_buffer_reset() was NOT resetting cluster_level. Ouch! Fix that.
Part of https://github.com/harfbuzz/harfbuzz/issues/1555
2022-01-03 11:45:31 -07:00
Behdad Esfahbod
36e9f467a4
[buffer] Overlay segment-properties in hb_buffer_append()
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1555
2022-01-03 11:23:14 -07:00
Behdad Esfahbod
6a66992842
Add hb_segment_properties_overlay()
...
New API:
+ hb_segment_properties_overlay()
2022-01-03 11:21:29 -07:00
Behdad Esfahbod
165a6073fa
Merge pull request #3338 from harfbuzz/slant
...
[font] Add public API for synthetic slant
2022-01-02 12:02:20 -07:00
Behdad Esfahbod
3fc2e654c0
[metrics] Fix slant calc
2022-01-02 11:56:45 -07:00
Behdad Esfahbod
a7751277e9
[docs] Add hb_font_[gs]et_synthetic_slant()
2022-01-02 11:50:02 -07:00
Behdad Esfahbod
4ab94443bb
[metrics] Ouch. Fix slant code
2022-01-02 11:26:45 -07:00
Behdad Esfahbod
f7d49d9c2b
[metrics] Simplify
2022-01-02 11:16:33 -07:00
Behdad Esfahbod
f1ba1f940f
[metrics] Only scale caret rise/run if font is slanted
2022-01-02 10:58:25 -07:00
Behdad Esfahbod
45c2b6e384
[metrics] Harden math
2022-01-02 10:57:19 -07:00
Behdad Esfahbod
fa008a021f
[metrics] Implement synthetic slant for caret slope
...
Part of https://github.com/harfbuzz/harfbuzz/pull/3338
2022-01-02 10:46:38 -07:00
Behdad Esfahbod
fc329f665f
[metrics] Scale up horizontal caret rise/run
...
Eg. if rise/run are 1/0, we now return upem/0. This is equivalent.
Part of https://github.com/harfbuzz/harfbuzz/pull/3338
2022-01-02 10:43:13 -07:00
Behdad Esfahbod
0df83f52a1
Fix test
2022-01-02 08:01:11 -07:00
Behdad Esfahbod
5b87c30d6b
[font] Mark hb_font_get_var_coords_design() non-experimental
...
Any remaining issue with the API will address later by deprecating it.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1865
2022-01-02 07:53:45 -07:00
Behdad Esfahbod
2d42fc9fbb
[font] Load named-instance if face index top bits are set
...
This matches FreeType behavior.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3348
2022-01-02 07:45:10 -07:00
Behdad Esfahbod
da7dba0002
[face] Clarify face_index handling
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3347
2022-01-01 11:20:20 -07:00
Behdad Esfahbod
6da4b80e5f
[hb-ot-var] Specify normalized 2.14 docs
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3345
2021-12-22 21:51:03 -07:00
Behdad Esfahbod
1b51be57dc
[hb-ot-var] Actually set in/out argument
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/3344
2021-12-22 21:43:48 -07:00
Behdad Esfahbod
06ee40213c
Use invisible-glyph for spaces if font has no ASCII space
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3340
Should add tests ideally.
2021-12-22 21:34:44 -07:00
Behdad Esfahbod
602bd39680
[style] Adjust font slant angle for synthetic slant value
...
Part of https://github.com/harfbuzz/harfbuzz/pull/3338
2021-12-19 21:40:25 -08:00
Behdad Esfahbod
ff697debd8
[GPOS] Apply font synthetic slant
...
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/3196
2021-12-19 21:20:25 -08:00
Behdad Esfahbod
810f5d71c7
[font] Add public API for slant
...
Not hooked up internally to anything.
New API:
+ hb_font_set_synthetic_slant()
+ hb_font_get_synthetic_slant()
Part of fixing https://github.com/harfbuzz/harfbuzz/issues/3196
2021-12-19 21:20:25 -08:00
Garret Rieger
067f90a820
[subset] Fix for fuzzer timeout.
...
Fixes https://oss-fuzz.com/testcase-detail/5549945449480192
In prune_langsys: move LangSys visited check up before any work is done for a LangSys. In this particular case the compare() method is responsible for the majority of the time spent and wasn't being guarded with a visisted check.
2021-12-14 17:34:21 -07:00
Garret Rieger
c4573c2ec7
[repacker] don't infinite loop if visited or roots is in error.
...
Fixes https://oss-fuzz.com/testcase-detail/5205038086094848
2021-12-14 15:57:48 -07:00
Khaled Hosny
be91d2917d
3.2.0
2021-12-12 04:45:54 +02:00
Garret Rieger
77507a1d8d
[subset] Don't double count visit lookups in closure_lookups
...
Each recursed lookup was getting counted once in closure_lookups() and then again in hb_closure_lookups_context_t::recurse.
2021-12-10 15:13:49 -07:00
Garret Rieger
d67025705f
[subset] reset the visited lookup count before each closure iteration.
2021-12-10 15:13:49 -07:00
Behdad Esfahbod
23159084b4
[morx] Reverse graphemese, not whole buffer
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3314
Supersedes https://github.com/harfbuzz/harfbuzz/pull/3315
2021-12-10 15:02:57 -07:00
Behdad Esfahbod
5b995526f7
[buffer] Fix reverse_group() to reverse() at the end
2021-12-10 14:59:56 -07:00
Behdad Esfahbod
21c4fc1011
[buffer] Add optional merge_clusters arg to reverse_groups()
2021-12-10 13:02:43 -07:00
Behdad Esfahbod
e949e51218
[ot-layout] Port foreach_grapheme to buffer foreach_group
2021-12-10 12:58:27 -07:00
Behdad Esfahbod
eb96e69d18
[buffer] Add foreach_group()
2021-12-10 12:55:29 -07:00
Behdad Esfahbod
1b78e04c78
[buffer] Add ::reverse_groups()
2021-12-10 12:45:43 -07:00
Behdad Esfahbod
4cd96e73e4
[buffer] Inline revers_range() / reverse()
2021-12-10 12:33:21 -07:00
Garret Rieger
5914acb3cb
[repacker] Clear distance and position cache when assigning a new space.
...
A change in space will effect the distance assigned to the node and any of it's children so clear the distance cache.
2021-12-10 11:09:03 -07:00
Qunxin Liu
706014f69d
[subset] (Chain)ContextSubst glyph_closure fix
...
- When pos_glyphs is empty, use current full glyphs set as input for
subsequent recursive closure process
- Also increase max_lookup_visit_count to 35000 cause a real font file hit
previous limit 20000 and some lookups are dropped unexpectedly
2021-12-10 11:08:36 -07:00