You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And while the parsing algorithm is very different, it's not better or worse, just different.
28
-
- Malformed fonts will cause an error. HarfBuzz uses fallback/dummy shaper in this case.
29
33
- No font size property. Shaping is always using UnitsPerEm. You should scale the result manually.
30
34
- Most of the TrueType and Unicode handling code was moved into separate crates.
31
-
-rustybuzz doesn't interact with any system libraries and must produce exactly the same
35
+
-harfruzz doesn't interact with any system libraries and must produce exactly the same
32
36
results on all OS'es and targets.
33
37
-`mort` table is not supported, since it's deprecated by Apple.
34
-
- No Arabic fallback shaper, since it requires subsetting.
35
38
- No `graphite` library support.
36
-
-`avar2` as well as other parts of the boring-expansion-spec are not supported yet.
37
39
38
40
## Performance
39
41
@@ -43,32 +45,26 @@ See [benches/README.md](./benches/README.md) for details.
43
45
44
46
## Notes about the port
45
47
46
-
rustybuzz is not a faithful port.
48
+
harfruzz is not a faithful port.
47
49
48
-
harfbuzz can roughly be split into 6 parts: shaping, subsetting, TrueType parsing,
49
-
Unicode routines, custom containers and utilities (harfbuzz doesn't use C++ std)
50
-
and glue for system/3rd party libraries. In the mean time, rustybuzz contains only shaping.
51
-
All of the TrueType parsing was moved to the [ttf-parser](https://github.com/RazrFalcon/ttf-parser).
52
-
Subsetting was removed. Unicode code was mostly moved to external crates.
53
-
We don't need custom containers because Rust's std is good enough.
54
-
And we do not use any non Rust libraries, so no glue code either.
50
+
harfbuzz (C++ edition) can roughly be split into 6 parts:
55
51
56
-
In the end, we still have around 23 KLOC. While harfbuzz is around 80 KLOC.
52
+
1. shaping, handled by harfruzz
53
+
1. subsetting, (`hb-subset`) moves to a standalone crate, [klippa](https://github.com/googlefonts/fontations/tree/main/klippa)
54
+
1. TrueType parsing, handled by [`read-fonts`](https://docs.rs/read-fonts)
55
+
1. Unicode routines, migrated to external crates
56
+
1. custom containers and utilities (harfbuzz doesn't use C++ std), reimplemented in [`fontations`](https://github.com/googlefonts/fontations) where appropriate (e.g. int set)
57
+
1. glue for system/3rd party libraries, just gone
57
58
58
59
## Lines of code
59
60
60
-
As mentioned above, rustybuzz has around 23 KLOC. But this is not strictly true,
61
-
because there are a lot of auto-generated data tables.
62
-
63
-
You can find the "real" code size using:
61
+
You can find the "real" code size (eliminating generated code) using:
0 commit comments