Behdad Esfahbod
d35dff020f
[cbdt] Remove extra clip
2022-12-24 10:59:17 -07:00
Behdad Esfahbod
f70c5d6f0d
[paint] Continue returning bool from paint_image()
...
6ccbfabd4f (commitcomment-94127307)
2022-12-24 10:56:06 -07:00
Matthias Clasen
4816be9ab5
Work around cairo limitations
...
If we just draw an image, cairos recording surface
complains that it is unbounded. Its not true of course.
To make things work, clip to the extents.
2022-12-24 09:16:29 -05:00
Behdad Esfahbod
c5f903872f
[paint] Add bitmap width/height to paint_image callback
...
Such that we can add raw data as well.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
237955dffc
[paint] Add slant to image() callback
...
And slant images in hb-view.
2022-12-23 13:37:59 -07:00
Matthias Clasen
6387004cad
[paint] Simplify api
...
Drop the hb_paint_context_t struct from the API, and
only pass the font where we need it.
2022-12-23 13:37:59 -07:00
Matthias Clasen
9be01b6bff
[paint] Pass hb_paint_context_t along
...
Replace the font argument with a hb_paint_context_t
that carries the font, the palette index and the
foreground color.
The hb_font_paint_glyph() api now takes the palette
index and the foreground color as extra arguments.
Update all callers and regenerate test results.
2022-12-23 13:37:59 -07:00
Matthias Clasen
97224f3b63
[paint] Pass font to all callbacks
...
This will lead to easier implementations.
At the same time, we change the push_clip_glyph
callback to use the font as-is, no unscaling needed.
Update all callers and expected test results.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
14bf3aaa8d
[colr] Make paint_image work again
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
7accbe97d8
[util] Fix argument order and root transform PNGs
2022-12-23 13:37:59 -07:00
Matthias Clasen
0a2f3673b9
[paint] Use tags for image formats
...
This fits better with the rest of the
HarfBuzz API.
2022-12-23 13:37:59 -07:00
Matthias Clasen
37f3f0fcc2
[paint] Change the image callback
...
Instead of passing the glyph ID, give
it the image blob, a mimetype, and
glyph extents (if available).
Update all callers.
2022-12-23 13:37:59 -07:00
Matthias Clasen
7996ae4c3d
CBDT: Implement paint glyph
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
b0abbfd868
[font] Centralize glyph-extents scaling
...
Needs more testing...
Some rounding was removed, namely in cff1 and cff2.
2022-12-22 07:32:15 -07:00
Behdad Esfahbod
59c45f6deb
Use hb_memcpy instead of memcpy consistently
2022-11-22 12:54:50 -07:00
Behdad Esfahbod
d119568df6
[cbdt] Use vector tail()
2022-11-20 14:11:51 -07:00
Behdad Esfahbod
ac1bb3e39e
[machinery] Move accelerators to constructor/destructor
2022-01-20 12:10:05 -07: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
63affc4eae
[vector] Move semantics when resizing
2022-01-15 12:24:20 -08:00
Behdad Esfahbod
c852b86841
Rename HBGlyphID to HBGlyphID16
2021-09-19 16:30:12 -04:00
Behdad Esfahbod
2337f0d047
Internally use hb_malloc/.../hb_free instead of malloc/.../free
...
Redefining those stock names as macros was conflicting with gcc 10
headers.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
2021-07-08 10:54:09 -07:00
Behdad Esfahbod
2520a82df9
s/LArrayOf/Array32Of/g
2021-03-31 15:41:54 -06:00
Behdad Esfahbod
ad28f973f3
Rename offset types to be explicit about their size
...
Add Offset16To<>, Offset24To<>, and Offset32To<> for most use-cases.
2021-03-31 13:00:07 -06:00
Behdad Esfahbod
dfa9d7acdc
[minor] Use serializer->propagate_error() to simplify code
2021-02-11 11:19:51 -07:00
Garret Rieger
fb1477795c
[ENOMEM] Check result of vector resize in CBDT subsetting.
2020-08-01 09:20:52 +04:30
Ebrahim Byagowi
9fc774ab00
minor spacing
2020-04-30 23:14:54 +04:30
ckitagawa
b22f61d86a
Fix bug
2020-04-21 16:51:55 -07:00
Ebrahim Byagowi
07acd1a042
[subset] Rename src_base args to base to match sanitize methods
...
So it will become easier to follow that serialize methods signatures should
match with their sanitize methods counterparts.
2020-03-08 23:39:26 +03:30
ariza
188a0a47c2
removed default base; replaced w/ bias if required
2020-03-08 22:59:43 +03:30
Ebrahim Byagowi
bdf372b24c
[subset/cbdt] Release the referenced cbdt table on error
...
Just accidentally spotted it, when the table has less than 4 bytes
2020-03-08 00:49:40 +03:30
Ebrahim Byagowi
71a2018600
[cbdt] minor, tweak spaces
2020-02-05 17:40:51 +03:30
Ebrahim Byagowi
eaa2402a79
[cbdt] Merge hb-ot-color-cbdt-table.cc into its header file
...
Not needed as far as can be said.
2020-02-05 17:09:12 +03:30
ckitagawa
b114b26a56
Add guard to copy_glyph_at_idx
2020-02-04 09:49:24 -05:00
ckitagawa
e128f80278
parent 777ba47b50
...
author ckitagawa <ckitagawa@chromium.org> 1579631743 -0500
committer ckitagawa <ckitagawa@chromium.org> 1580506176 -0500
[subset] Add CBLC support
2020-01-31 16:37:30 -05:00
Ebrahim Byagowi
ce114d6b27
minor, tweak spaces
2019-12-31 15:53:02 +03:30
Daeren
1770493cf5
Fix unary minus operator applied to unsigned int
...
Applying unary minus operator to unsigned int causes the following error on MSVS: error C4146
This patch fixes the error.
2019-12-11 09:19:19 -06:00
Ebrahim Byagowi
d73cdcf361
[ot-font] Apply font scaling before turning to int
2019-10-08 11:11:18 +03:30
Ebrahim Byagowi
0558413f27
Minor, tweak spaces
2019-10-01 13:50:11 +03:30
Ebrahim Byagowi
d512087e4d
Rename GlyphID to HBGlyphID
...
Avoid collision with macOS's ATSUnicodeTypes.h GlyphID
2019-09-14 11:55:53 +04:30
Ebrahim Byagowi
a0b4ac4dce
Turn 8 spaces to tab across the project
...
According to the current code style of the project
2019-08-27 02:40:41 +04:30
Behdad Esfahbod
dfc5780245
Fix more double-promotion errors
...
WHy do only some of the clang bots catch this I have no idea :(.
2019-05-07 23:26:09 -07:00
Behdad Esfahbod
41248cce0e
Remove MIN/MAX in favor of hb_min/hb_max
2019-05-07 20:54:31 -07:00
Ebrahim Byagowi
92588782d7
Remove space between right angle brackets now that we have C++11 ( #1689 )
2019-04-30 13:05:10 -07: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
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
b1152d5e66
Use NNOffsetTo<>
2019-01-17 18:17:04 -05:00
Ebrahim Byagowi
e412008599
Remove redundant void from C++ sources ( #1486 )
2018-12-17 13:01:01 -05:00
Ebrahim Byagowi
b2ebaa9afa
Remove redundant 'inline' from methods ( #1483 )
2018-12-16 14:08:10 -05:00
Ebrahim Byagowi
7ee5c52345
minor style fix, use void in methods on no argument
2018-12-12 15:14:37 +03:30
Behdad Esfahbod
5c4fead734
Convert "static const hb_tag_t" constants to enum
2018-11-29 15:05:47 -05:00