Behdad Esfahbod
26d34392e2
[hb-cairo] Fix condition
2023-01-26 14:32:25 -05:00
Matthias Clasen
f9b3c79047
Update to different cairo API
...
The cairo will likely end up begin a getter for
a cairo_pattern_t instead of a color.
2023-01-26 14:32:25 -05:00
Behdad Esfahbod
4afdbcbad5
[hb-cairo] Don't call get_foreground_color unnecessarily
...
That would invalidate cairo cache on foreground change, even
if the glyph doesn't need that.
2023-01-26 14:32:25 -05:00
Matthias Clasen
c37ea4f93e
hb-cairo: Fix handling of foreground color
...
Use the new cairo_user_scaled_font_get_foreground_color
to obtain the foreground color, since the cr's source
can't be trusted.
Requires https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/420
2023-01-26 14:32:25 -05:00
Behdad Esfahbod
aea37bfd37
Fix c++20 build
2023-01-26 12:19:16 -07:00
Behdad Esfahbod
e1dc4920ee
[iter] Allow hb_len() to fetch c.len as non-function
2023-01-26 12:19:16 -07:00
Behdad Esfahbod
8d29be39b2
[gsubgpos] Minor drop an unnecessary hb_iter
2023-01-26 12:19:16 -07:00
Matthias Clasen
c1a5d20951
[doc] Add a missing comma
2023-01-25 21:53:06 -05:00
Behdad Esfahbod
570fe998c9
[cairo] Another sweep_gradient fix
...
k was -1 sometimes.
Fixes the rest of https://roettsch.es/var_colrv1.html
2023-01-25 15:42:24 -07:00
Behdad Esfahbod
ea316b56a0
[cairo] Flip offsets when reversing
...
Fixes many of the var_colrv1 first row tests.
https://roettsch.es/var_colrv1.html
2023-01-25 15:31:29 -07:00
Behdad Esfahbod
5b05e198cf
[cairo] More hb_malloc
2023-01-25 15:24:14 -07:00
Behdad Esfahbod
57352b8bd4
[cairo] Use hb_malloc / hb_free
2023-01-25 15:22:27 -07:00
Behdad Esfahbod
a9392c0cbb
[cairo] Use hb_swap()
2023-01-25 14:57:02 -07:00
Qunxin Liu
5e86870378
[instancer] compute head/maxp values using only non-empty glyphs
2023-01-25 14:53:19 -07:00
Qunxin Liu
d15551c6f3
[instancer] update head table flagbit: allXMinIsLsb
2023-01-25 14:53:19 -07:00
Behdad Esfahbod
2c49eba044
[cairo] Indent
2023-01-25 14:52:39 -07:00
Behdad Esfahbod
2accbdc0b6
[paint] Minor skew
2023-01-25 14:40:04 -07:00
Behdad Esfahbod
a4420479a8
Revert "[VarComposite] Fix skew"
...
This reverts commit 8cf7076309
.
2023-01-25 14:37:10 -07:00
Behdad Esfahbod
8cf7076309
[VarComposite] Fix skew
2023-01-25 14:35:35 -07:00
Behdad Esfahbod
626f8e4de3
[paint] Fix skew to match Chrome
2023-01-25 14:33:46 -07:00
Behdad Esfahbod
b44ff062e1
[deserialize] Some more
2023-01-25 14:16:46 -07:00
Behdad Esfahbod
57ff696430
[deserialize] One more fix
2023-01-25 14:10:12 -07:00
Behdad Esfahbod
e973050986
[hb-buffer-deserialize] Fixups
2023-01-25 14:07:01 -07:00
Behdad Esfahbod
a1101f09ca
[test-buffer-serialize] Handle too-small out buffer
...
Need to handle too-small in buffer still.
2023-01-25 13:10:57 -07:00
Behdad Esfahbod
2fec4f1c3d
[subset] Finish out hb-subset-instancer-solver.cc
2023-01-25 12:21:15 -07:00
Qunxin Liu
90a98dd62a
[instancer] fix potential memory leak for compiled glyph bytes
...
Also calculate max_offsets after glyph bytes are compiled, cause byte
length of a glyph might change after compile
2023-01-25 11:37:19 -07:00
Behdad Esfahbod
223abd72b9
[subset] Add unfinished port of fonttools instancer solver
2023-01-25 11:37:07 -07:00
Behdad Esfahbod
1b143b0f0c
[font] Docs
2023-01-24 18:34:04 -07:00
Behdad Esfahbod
64ed03c9be
[cff1] Return no name for out-of-range glyph IDs
...
Was returning .notdef before.
2023-01-24 18:33:34 -07:00
Matthias Clasen
c89aebc40b
hb-font: Document length limit for glyph names
...
This is useful information for users of the
hb_font_get_glyph_name() API.
2023-01-24 18:29:06 -07:00
Qunxin Liu
27f72f0deb
[instancer] avoid double free for compiled glyph bytes
...
also increase the HB_GLYF_MAX_POINTS limit to 20000 cause the test file has a
.notdef glyph which is a composite glyph and has 10176 points after
get_points() call
2023-01-24 17:28:51 -07:00
Behdad Esfahbod
b684c6edd4
[hb-cairo] Add hb_cairo_context_t
2023-01-24 12:21:12 -07:00
Behdad Esfahbod
72e13fff65
[COLRv1] Handle void extents
2023-01-24 11:05:38 -07:00
Behdad Esfahbod
20318feddf
[COLRv1] Don't return extents if glyph has no paint
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/4068
2023-01-24 11:04:10 -07:00
Behdad Esfahbod
32afdcdb46
[hb-buffer-deserialize-text-unicode] Relax parsing
2023-01-23 21:10:11 -07:00
Behdad Esfahbod
328ee9b4ad
[hb-buffer-deserialize-text-unicodes] Rename
2023-01-23 21:06:27 -07:00
Behdad Esfahbod
bc596b8cca
[buffer-deserialize-text-unicode] Simplify
2023-01-23 21:03:59 -07:00
Behdad Esfahbod
649973a316
Fix build
2023-01-23 21:02:14 -07:00
Behdad Esfahbod
4268283e54
[buffer-deserialize-text] Accept initial comma
2023-01-23 20:57:56 -07:00
Behdad Esfahbod
2c29b81e7f
[buffer-deserialize-text] Separate glyphs / unicodes machines
2023-01-23 20:57:56 -07:00
Behdad Esfahbod
d0355eb4bd
[buffer-deserialize] Parse whole items at a time
...
Previous logic would fail if char buffer was partial.
2023-01-23 20:57:56 -07:00
Matthias Clasen
f65b04c17c
Tweak wording
2023-01-23 19:58:14 -07:00
Matthias Clasen
7e01976bcc
[hb-paint] Add some details to the docs
2023-01-23 19:58:14 -07:00
Garret Rieger
e4fff64ce3
[repacker] check duplicate() for success.
...
Fixes fuzzer testcase https://oss-fuzz.com/testcase-detail/5475787333828608 .
2023-01-23 18:37:13 -07:00
Behdad Esfahbod
6b72a4ddb0
Revert "[sanitize] Simplify(?) check_range"
...
This reverts commit af0b1ef8a7
.
2023-01-23 18:36:04 -07:00
Behdad Esfahbod
00cf322e23
Merge pull request #4046 from harfbuzz/hb-features-docs
...
[doc] Try to fix generating hb-features docs
2023-01-23 16:06:26 -07:00
Khaled Hosny
699485b349
[meson] Further simplify generating hb-features.h
2023-01-24 00:15:48 +02:00
Khaled Hosny
2486d6d22f
[meson] Reduce repetitions
2023-01-24 00:15:48 +02:00
Khaled Hosny
12f2ecbddb
[doc] Generate hb-supported-features.h
...
See inline comment.
2023-01-24 00:15:48 +02:00
Khaled Hosny
0bbd3360ee
[doc] Try to fix generating hb-features docs
...
Move it to a separate section, since hb-common says include hb.h, while
we want to include hb-features.h here.
This still does not fix generating documentation of undefined macros
(e.g. HB_HAS_GDI since we build docs on Linux).
2023-01-24 00:12:06 +02:00
Behdad Esfahbod
af0b1ef8a7
[sanitize] Simplify(?) check_range
2023-01-23 14:31:10 -07:00
Behdad Esfahbod
fe94c760e1
[algs] Build fix for clang and __builtin_mul_overflow
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/4066
2023-01-23 14:05:28 -07:00
Khaled Hosny
1cf61f3053
[meson] Fix build with -Dgobject=disabled
2023-01-23 16:26:35 +02:00
Behdad Esfahbod
def94aa8c5
[features] Add HB_HAS_GOBJECT
2023-01-22 14:01:34 -07:00
Behdad Esfahbod
b3006ba9cb
Docs
2023-01-22 13:46:35 -07:00
Behdad Esfahbod
e3e4d1ecdc
[name] Add hb_ot_name_id_predefined_t
...
Not sure what to do about its docs.
2023-01-22 13:41:43 -07:00
Behdad Esfahbod
7a47a369d3
[hmtx] Fix typo
2023-01-22 09:09:45 -07:00
Behdad Esfahbod
b987918125
Merge pull request #4052 from googlefonts/instancer_recalc_bounds
...
[instancer] recalc bounds by default when --instance option is enabled
2023-01-22 09:08:51 -07:00
Behdad Esfahbod
749df4ee84
[PairPosFormat1] One more
2023-01-21 16:00:54 -07:00
Behdad Esfahbod
b648ceb72f
[PairSet] Optimize last commit
2023-01-21 15:58:59 -07:00
Behdad Esfahbod
891623243c
[PairSet] Unify get_size()
2023-01-21 15:57:18 -07:00
Behdad Esfahbod
b63159e8bf
[PairPosFormat1] Fix stride
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55287
and generally the lookup with MediumTypes.
2023-01-21 15:51:40 -07:00
Behdad Esfahbod
be8a87c453
Move TRACE_DISPATCH after may_recurse()
...
Such that we don't get memory access issues if DEBUG_SANITIZE is
on and may_recurse() returns false.
2023-01-21 15:50:25 -07:00
Behdad Esfahbod
84b9a632ed
[debug] Fix printf signness warnings
2023-01-21 14:37:34 -07:00
Khaled Hosny
c08e5d094a
[hb-draw] Fix MSVC warning
...
warning C4305: 'initializing': truncation from 'double' to 'float'
2023-01-21 15:27:56 +02:00
Matthias Clasen
32f9b467d6
Merge pull request #4045 from harfbuzz/custom-palette-cairo
...
Custom palette cairo
2023-01-21 02:20:39 -05:00
Matthias Clasen
47baa1da6b
[hb-cairo] Fixes for sweep gradients
...
Make reversed angles not infloop, and
cap the number of interval repetitions
at 1000.
Fixes: https://github.com/harfbuzz/harfbuzz/issues/4055
2023-01-20 23:38:22 -05:00
Behdad Esfahbod
7f59bed528
[hb-cairo] Round foreground color
2023-01-20 16:42:55 -07:00
Behdad Esfahbod
76b059cadb
[hb-cairo] Simplify foreground color fetching
2023-01-20 16:41:47 -07:00
Behdad Esfahbod
f70f7194de
[hb-cairo] Remove unused prototype
2023-01-20 16:30:59 -07:00
Behdad Esfahbod
61719a8350
[hb-view] Support specifying color indices again
2023-01-20 15:52:09 -07:00
Qunxin Liu
30058f489a
[instancer] trim .notdef outline data after recalc bounds
...
If outline data present, we use it to recalc bounds and then trim it
accordingly
2023-01-20 14:50:03 -08:00
Qunxin Liu
0de7f83a9f
[instancer] update maxp table
2023-01-20 14:50:03 -08:00
Qunxin Liu
94c390d078
[instancer] update head table
2023-01-20 14:50:03 -08:00
Qunxin Liu
2ecb1c31e9
[instancer] always recalculate bounds when --instance option enabled
...
But don't recompile glyph bytes if pinned at default
2023-01-20 14:50:03 -08:00
Qunxin Liu
1f948e7fd5
[instancer] store recalculated head/maxp info in subset plan
2023-01-20 14:49:54 -08:00
Qunxin Liu
92122421c9
[instancer] update vhea/hhea tables
2023-01-20 14:48:53 -08:00
Behdad Esfahbod
ab7c914425
[hb-cairo] Macro shuffle again
2023-01-20 15:43:01 -07:00
Behdad Esfahbod
4759932bcf
[hb-cairo] Round colors
2023-01-20 15:33:38 -07:00
Behdad Esfahbod
876675e090
[hb-cairo] Macro shuffling
2023-01-20 15:31:43 -07:00
Behdad Esfahbod
68a73e436a
[hb-cairo] Macro hygiene
2023-01-20 15:30:07 -07:00
Khaled Hosny
fcb5111cc6
[doc] Fix gtk-doc warning
2023-01-21 00:24:50 +02:00
Behdad Esfahbod
574d9344dc
[hb-cairo] Fix build with old cairo
2023-01-20 15:22:50 -07:00
Behdad Esfahbod
4f19c3b3be
[hb-cairo] Move color-cache to scaled-font
2023-01-20 15:15:52 -07:00
Behdad Esfahbod
beba43eebe
[hb-cairo] Fix color cache on not-found
2023-01-20 15:02:24 -07:00
Behdad Esfahbod
cc9b55c794
[hb-cairo] Add a color cache
2023-01-20 14:57:57 -07:00
Behdad Esfahbod
eb00088bcf
[paint] Docs
2023-01-20 13:57:39 -07:00
Behdad Esfahbod
f21b15dcc3
[hb-view] Update to alternative cairo custom-palette API
2023-01-20 13:57:39 -07:00
Behdad Esfahbod
638e0ed4fd
[paint] Overlay custom-palette on top of chosen palette
...
Got to agree this is more ergonomic.
2023-01-20 13:57:39 -07:00
Matthias Clasen
b81db8d3d8
Avoid a compiler warning
2023-01-20 13:57:39 -07:00
Behdad Esfahbod
4fe6ece425
[cairo] Don't fallback to CPAL if cairo doesn't support custom palette
2023-01-20 13:57:39 -07:00
Matthias Clasen
ab37ade7e4
Hook up custom palettes for cairo
2023-01-20 13:57:39 -07:00
Behdad Esfahbod
edec8946ed
New API: hb_ot_layout_script_select_language2()
...
Variant that outputs chosen_language.
Not sure why the original API didn't have this. The script
counterpart has.
2023-01-20 09:28:59 -07:00
Behdad Esfahbod
2fd8e36ea5
[layout] Fix return value of chosen_script when matching fails
2023-01-20 09:09:14 -07:00
Behdad Esfahbod
d06976e68f
[glyf] Add an edge-count limit
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55246
2023-01-20 08:21:43 -07:00
Behdad Esfahbod
0b32cf9023
[COLR] Rename a variable
2023-01-18 21:16:38 -07:00
Behdad Esfahbod
1d58c8fb0e
[paint] Typo
2023-01-18 21:14:24 -07:00
Behdad Esfahbod
7aca3b5090
[COLRv1] Hook up custom palette colors
2023-01-18 21:01:44 -07:00
Behdad Esfahbod
53bd9039e7
[paint] Doc
2023-01-18 20:44:05 -07:00
Behdad Esfahbod
8afd3ccb10
[paint] Add HB_PAINT_PALETTE_INDEX_CUSTOM
2023-01-18 20:43:10 -07:00