RazrFalcon / rustybuzz

A complete harfbuzz's shaping algorithm port to Rust
MIT License
498 stars 34 forks source link

Sync with 4.0.1 #97

Closed LaurenzV closed 4 months ago

LaurenzV commented 4 months ago
Status Commit message HB Comments
⚪️ [ci] Downgrade pip on MSVC jobs Link
🟢 [arabic] Update to AMTRA revision 6 Link
🟢 [ot-tag] Add HB_SCRIPT_MATH (Zmth) and map it to OT ‚Äòmath‚Äô tag Link
⚪️ Revert "[ci] Downgrade pip on MSVC jobs" Link
⚪️ [ot-math] Add hb_ot_math_get_glyph_kernings Link
⚪️ [ci] Upgrade pip on MSVC job Link
⚪️ hb-algs.hh: Fix build on Visual Studio 2015 Link
⚪️ meson.build: Only use get_variable() on icu_dep with pkgconfig Link
⚪️ [machinery] Allow using lazy-loader with void* Link
⚪️ [subset] Add subset plan to public API. Link
⚪️ [subset] add subset plan reference Link
⚪️ [subset] Change subset plan create to be or_fail. Link
⚪️ [subset] Fix memory leak in plan creation. Link
⚪️ Add a fuzzer font Link
⚪️ [hmtx] Remove one subset-specific method from hmtx accelerator Link
⚪️ [hmtx] Remove other subset-specific method from hmtx accelerator Link
⚪️ [test/subset] Don't hash files without reason Link
⚪️ Merge pull request #3398 from harfbuzz/buffer-verify Link
⚪️ [name] Extraneous (out) annotation in return value Link
⚪️ 3.4.0 Link
⚪️ Typo Link
⚪️ [ci] Add configs-ci.yml to test different configs Link
⚪️ Fix compiler warning Link
⚪️ [draw] Remove EXPERIMENTAL_API tag Link
⚪️ [font] Add em_scaleff() that returns float Link
⚪️ [font] Add emfscalef[xy] That take and return float Link
⚪️ [draw] Convert API to float instead of hb_position_t Link
⚪️ [main] Fix compiler warnings Link
⚪️ [draw] Replace API Since tags with REPLACEME Link
⚪️ [draw] Move hb_font_draw_glyph() to hb-draw-glyph.cc Link
⚪️ [draw] Remove return value of hb_font_draw_glyph() Link
⚪️ [draw] Whitespace Link
⚪️ [draw] Another Since: tag update Link
⚪️ [test-draw] Fix compiler warning Link
⚪️ [draw] Enable draw tests Link
⚪️ Remove remaining traces of HB_EXPERIMENTAL_API Link
⚪️ [draw-fuzzer] Fix signatures Link
⚪️ [draw] Fix draw signatures Link
⚪️ [draw] Remove unneeded roundf() calls Link
⚪️ [draw] Rename user_data to draw_data Link
⚪️ [draw] Virtualize hb_font_draw_glyph() into hb_font_get_glyph_shape() Link
⚪️ [draw] Add REPLACEME Link
⚪️ [draw] Add TODO Link
⚪️ [test-draw] Re-enable two disabled tests Link
⚪️ [draw-state] Add type and use in draw-helper Link
⚪️ [draw] Remove check for no-op Link
⚪️ [draw] Simplify start_path Link
⚪️ [draw] Rename internal methods Link
⚪️ [test-draw] Fix compiler warning Link
⚪️ [draw] Add public move_to/line_to/... API that take a draw-state Link
⚪️ [draw-state] Pass state down to callbacks Link
⚪️ [draw] Rename internal draw_helper_t to draw_session_t Link
⚪️ [draw] Do quadratic-to-cubic conversion in nil quadratic implementation Link
⚪️ [util] Use hb-draw to render alternatively to cairo-ft Link
⚪️ [draw] Rename internal draw_session_t to hb_draw_session_t Link
⚪️ [ft/draw] Implement hb-draw for hb-ft Link
⚪️ [util/draw/ft] Use hb-draw for font-funcs=ft as well Link
⚪️ [util/draw] Render color glyphs if cairo API available Link
⚪️ [draw] Minor cleanup Link
⚪️ [font/draw] Fetch shape from parent font if not implemented in font Link
⚪️ [draw] Add more reserved items to hb_draw_state_t Link
⚪️ [draw-session] Add slant Link
⚪️ [font/draw] Slant drawings Link
⚪️ [util] Add --font-slant Link
⚪️ [font] Adjust synthetic-slant docs Link
⚪️ [font] Update get_glyph_shape() doc Link
⚪️ [draw] Flesh out docs a bit Link
⚪️ [draw] Document more Link
⚪️ [util/draw] Apply slant to non-user-fonts as well Link
⚪️ [draw] Destroy callback data Link
⚪️ [meson] fix building with Cairo subproject Link
⚪️ [doc] Message draw documentation a bit Link
⚪️ [meson] Put back Experimental-API infrastructure Link
⚪️ [doc] Document HB_DRAW_STATE_DEFAULT Link
⚪️ [doc] Link to respective draw callback functions Link
⚪️ [meson] Update cairo subproject Link
⚪️ [draw] Implement COLRv0 fonts Link
⚪️ [draw] Fix conversion warnings Link
⚪️ [util/draw] Use hb-draw in hb-view only if HB_DRAW=1 Link
⚪️ [util/draw] Explicitly chain from render_color_glyph to render_glyph Link
⚪️ [util/draw] If HB_DRAW is not set Link
⚪️ [util] Default font-funcs to 'ot' instead of 'ft' Link
⚪️ [draw] Add test for hb_draw_move_to() etc Link
⚪️ [draw] Add test for applying synthetic slant Link
⚪️ [draw] Emit move_to immediately Link
⚪️ [draw] Another try at a stable draw moveto semantic Link
⚪️ [util] Implement --sub-font Link
⚪️ [draw] Test scaling subfont differently from parent Link
⚪️ [draw/glyf] Don't skip empty contours of size 2 Link
⚪️ [meson] Update cairo submodule Link
⚪️ [draw] Fix some introspection warnings Link
⚪️ [algs] Fix typo in hb_pair_t conversion operator Link
⚪️ [draw/glyf] Emit empty contours Link
⚪️ [draw/test] Add test for freetype callback Link
⚪️ [test/draw] Typo Link
⚪️ [draw/test] Swap a freetype test case with a simpler one Link
⚪️ [meson] Update Cairo subproject Link
⚪️ Remove return of void Link
⚪️ [ot-face] Load num-glyphs from `loca` table before `maxp` Link
⚪️ [hmtx] Internal rename num_metrics to num_bearings Link
⚪️ [hmtx] Rename internal num_advances to num_long_metrics Link
⚪️ [hmtx] Document Link
⚪️ [test] Add test for current hmtx logic Link
⚪️ [hmtx] Implement [boring-expansion] >64k expansion Link
⚪️ Fix build Link
⚪️ [test/api] Fix leaks Link
⚪️ [ci] Rename configs-ci to configs-build Link
⚪️ [test/shape] Internal rename Link
⚪️ [config] Add HB_NO_BORING_EXPANSION Link
⚪️ [machinery] Add "core table" machinery Link
⚪️ [ot-face] Use core tables Link
[face] Use max numGlyphs of maxp and loca Link
⚪️ Merge pull request #3411 from harfbuzz/draw Link
⚪️ Improve docs for hb_ot_layout_get_ligature_carets Link
⚪️ [autotools] Fix make distcheck Link
⚪️ [ot-layout] Add +hb_ot_layout_get_horizontal_baseline_tag_for_script() Link
⚪️ Merge pull request #3410 from harfbuzz/boring-expansion Link
⚪️ [ot-layout] Remove commented-out prototypes Link
⚪️ [ot-layout] Synthesize missing baselines Link
⚪️ [ot-layout] Add central baselines Link
⚪️ meson: Cleanup finding FreeType on Visual Studio Link
⚪️ meson: Clean up finding ICU-UC on Visual Studio Link
⚪️ freetype2.wrap: Provide fallback for CMake dep as well Link
⚪️ BUILD.md: Mention that installing CMake is recommended for MSVC Link
⚪️ Merge pull request #3449 from fanc999/msvc-meson-use-cmake Link
⚪️ Revert "hb-algs.hh: Fix build on Visual Studio 2015" Link
⚪️ Merge pull request #3437 from matthiasclasen/synthesize-missing-baselines Link
⚪️ [ot-metrics] Synthesize missing metrics Link
⚪️ [subset] document return values. Link
⚪️ [util] Rename template typenames to avoid clashing with actual types Link
🟢 [buffer] Add HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT Link
⚪️ [hb-style] Fix synthetic slant values Link
⚪️ [hb-style] Fix the sign of slant ratios Link
⚪️ [style] Move the negation into the constant Link
⚪️ Add a missing file Link
⚪️ [meson] handle multiple element ICU DEFS Link
⚪️ Merge pull request #3459 from jameshilliard/icu-defs-mutliarg Link
⚪️ Merge pull request #3429 from harfbuzz/external_plan Link
⚪️ Merge pull request #3423 from harfbuzz/revert-ci-msvc Link
⚪️ [doc] Various fixes to newly added documentation Link
⚪️ [subset] Rename codepoint -> unicode in subset plan api Link
⚪️ [doc] Typo Link
⚪️ 4.0.0 Link
⚪️ Minor [ci skip] Link
⚪️ Fixed various misc. typos Link
⚪️ Merge pull request #3464 from luzpaz/typos Link
🟢 [aat] Update OT to AAT mappings for hist and vrtr Link
🟢 [USE] Restore the category WJ Link
🟢 [USE] Allow any non-numeric tail in symbol cluster Link
🟢 [USE] Simplify `not_ccs_default_ignorable` Link
🟢 [USE] Remove obsolete symbol/punctuation overrides Link
🟢 [USE] Treat all gc=Cn as independent clusters Link
🟢 [USE] Remove obsolete overrides Link
🟢 Update IANA Language Subtag Registry to 2022-03-02 Link
⚪️ [layout] Fix handling of baseline variations Link
⚪️ [repacker] expose hb_subset_repack() API Link
⚪️ [doc] Add experimental repacker API to private section Link
⚪️ 4.0.1 Link
LaurenzV commented 4 months ago

Most changes were irrelevant, because a lot of them are for the draw API which don't matter for us (right?).

There were a couple of changes which I think belong to ttf-parser, but I still marked them as orange so you can take a quick look because I want to err on the side of caution, so this time there are more commits marked as orange, but a lot of them depend on each other.

P.S: I tried to port to 4.1 as well so that we're straight at the reorg commits, but the commit directly after introduces changes to the ragel machine which makes it look different and it doesn't compile anymore, and I don't know how it works... So I think someone who knows how it works will have to take a stab at that one.

RazrFalcon commented 4 months ago

Most changes were irrelevant, because a lot of them are for the draw API which don't matter for us (right?).

Yep. We have ttf-parser for that.

commit directly after introduces changes to the ragel machine which makes it look different and it doesn't compile anymore

You mean rl files were changed and ragel cannot produce Rust code anymore?

[ot-math] Add hb_ot_math_get_glyph_kernings

Not sure about now, but when I was originally porting harfbuzz, the MATH table wasn't used during shaping. And the only reason it is present in ttf-parser is because someone needed it. But rustybuzz doesn't use it.

Once again, harfbuzz isn't just a shaper, it's a collection of things. rustybuzz just a shaper.

[font] Add em_scaleff() that returns float

Irrelevant. We do not support font scaling. For better or worse. There are some edge cases and quirks, but in most cases it can be done by the caller it whatever way it wants.

[draw-session] Add slant

Irrelevant.

[ot-face] Load num-glyphs from loca table before maxp [face] Use max numGlyphs of maxp and loca

Irrelevant. It's a ttf-parser problem to handle malformed fonts.

[hmtx] Internal rename num_metrics to num_bearings [hmtx] Rename internal num_advances to num_long_metrics

Irrelevant. TrueType parsing is out of the scope unless tests are failing.

[hmtx] Implement [boring-expansion] >64k expansion

There are no plans to support TrueType extensions.

[ot-layout] Add +hb_ot_layout_get_horizontal_baseline_tag_for_script() [ot-layout] Synthesize missing baselines [ot-layout] Add central baselines [ot-metrics] Synthesize missing metrics

Irrelevant. rustybuzz only does shaping. It has no font info getters.

LaurenzV commented 4 months ago

You mean rl files were changed and ragel cannot produce Rust code anymore?

I can still produce Rust code. But the Rust code now looks a lot different and just changing "0" to "p0" doesn't fix it anymore, there's more broken stuff in there. If you want I can make a separate branch with just that one commit to demonstrate.

Once again, harfbuzz isn't just a shaper, it's a collection of things. rustybuzz just a shaper.

Yeah, I know. :p But sometimes I'm still a bit unsure so I'd rather just ask instead of straight up ignoring it, I hope you don't mind. If you do then I can also try to trust my "intuition" more in the future.

LaurenzV commented 4 months ago

There are no plans to support TrueType extensions.

So all of the >64k expansion commits can probably be ignored for the future?

RazrFalcon commented 4 months ago

Then the only way is to send a bugreport to ragel, but it's kinda dead, so what's the point... In the worst case scenario we could fallback to manual C to Rust code conversion, as it was done originally.

Yeah, I know. :p But sometimes I'm still a bit unsure so I'd rather just ask instead of straight up ignoring it, I hope you don't mind. If you do then I can also try to trust my "intuition" more in the future.

You can still ask if unsure, I don't mind. Again, all I care about it that tests are passing.

So all of the >64k expansion commits can probably be ignored for the future?

Yes, we're not interested in this. Those changes are not part of the TrueType spec.

LaurenzV commented 4 months ago

I guess for 4.0.1 this should be complete then.

LaurenzV commented 4 months ago

Okay I made some more manual changes to the machine and it seems like it works, including the new test cases that were added. So maybe I will try all of 4.1 tomorrow. Don't seem to be too many commits anyway, but no promises.

But we can still merge 4.0.1 as is, I think.

RazrFalcon commented 4 months ago

Thanks!