Commit Graph

10003 Commits

Author SHA1 Message Date
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