Appendix G
Bugs this book found
Writing this book meant building small fonts that exercise one thing each, shaping text with them, and checking every result against the code and the specifications (Testing with a font of your own). Some results didn’t match. Those are drafted as bug reports in notes/upstream-bug-reports.md, in the book’s repository, 86 so far, the first 83 reproduced on HarfBuzz 15.1.0 (commit 3df40d9b), the version the book then described, and the last three on 15.2.0, most with a font or a command that needs nothing from this book. This appendix lists them all. What they suggest about where bugs are left to find is in Where the bugs are.
Two are on HarfBuzz’s issue tracker. HHW-71 is issue #6827, and HHW-82 is #6828, both now closed. The rest went to HarfBuzz’s author directly, and most are fixed, in HarfBuzz 15.2.0 or since (see the last column below), but they are still drafts, written by the book’s authors. Some are certainly bugs, some are matters of policy that HarfBuzz’s developers may well decide the other way, and a few were found by reading code and have no example yet. One, HHW-7, turned out not to be a bug, and is withdrawn.
Each draft keeps its number for good, and its ID, such as HHW-75, is how HarfBuzz’s pull requests cite it (“How HarfBuzz Works bug 75”). A withdrawn draft keeps its number too.
The tables below give each draft’s number in that file, a one-line summary, the chapter that describes the behavior, and how it was checked:
- Live. The chapter showed the behavior in a live block, built from HarfBuzz 15.1.0. Where 15.2.0 fixed it, the block now shows the fix.
- Run. Reproduced with HarfBuzz’s tools or a small program, but not shown live.
- Read. Found by reading the code.
The last column records what has happened upstream. Drafts 1–65 were shown to HarfBuzz’s author, Behdad Esfahbod, on 17 November 2026, and he fixed many of them on the main branch the same day; most of the rest were fixed over the next three days. HarfBuzz 15.2.0, released on 20 November 2026, has every fix merged up to 19 November. Every draft was checked again against main at commit 8846dbbf6 (20 November), by rerunning its example or, for those found by reading, reading the code again. On 21 November the drafts not yet fixed, and those about the renderers, were checked once more, against main at 1b988bc38. The five drafts still open then were fixed on main later that day, and checked at ce1ecd7c0. The column says “fixed in 15.2.0” or “fixed on main”, for a fix merged after the release, with the pull requests that fixed the draft (notes/upstream-bug-reports.md has the commits); “partly fixed” where some of a draft’s items are fixed; “declined” where HarfBuzz’s developers decided to keep the behavior; “open” where the draft still describes main; and “withdrawn” where the draft turned out to be wrong. Related issues come from a keyword search of HarfBuzz’s issues and pull requests, which isn’t exhaustive.
Shaping results
Wrong glyphs or positions from hb_shape, in fonts and text that are valid.
| ID | Summary | Chapter | Checked | Upstream |
|---|---|---|---|---|
| HHW-5 | Two glyph-flag functions treat cluster level 3 as monotone | Buffers | Read | Fixed in 15.2.0: #6706 |
| HHW-8 | A ranged request then a global one for the same feature clears the global bit, turning off every global feature in the range | From features to lookups | Live | Fixed in 15.2.0: #6704 |
| HHW-10 | In the Indic shapers’ normalization mode, text without marks is decomposed but never recomposed | Normalization | Live | Fixed in 15.2.0: #6705 |
| HHW-11 | A variation-selector cluster ignores the not-found glyph | Normalization | Live | Fixed in 15.2.0: #6699 |
| HHW-12 | A mark skips a base whose mark bit is off and attaches to an earlier one |
GPOS: positioning glyphs | Live | Fixed in 15.2.0: #6736 |
| HHW-15 | A cross-stream kern value of 0x8000 isn’t treated as a reset |
Legacy kern | Live | Fixed in 15.2.0: #6732 |
| HHW-16 | Fallback mark positioning ignores the base’s x offset | Fallbacks | Live | Fixed in 15.2.0: #6701 |
| HHW-17 | Fallback positioning centers LEFT and RIGHT marks, contrary to its comment | Fallbacks | Live | Fixed in 15.2.0: #6742 corrects the comment, and keeps the centering, which is deliberate |
| HHW-18 | Vertical kern subtables can never apply |
Legacy kern | Live | Fixed in 15.2.0: #6734 |
| HHW-19 | The Hangul shaper’s dotted circle copies the tone mark’s properties | Hebrew, Thai, Lao, and Hangul | Live | Fixed in 15.2.0: #6711 |
| HHW-20 | Two dotted circles before a Hangul tone mark at the start of text | Hebrew, Thai, Lao, and Hangul | Live | Fixed in 15.2.0: #6712 |
| HHW-21 | Hebrew: a mark feature under DFLT stops composition, but GPOS isn’t applied |
Hebrew, Thai, Lao, and Hangul | Live | Fixed in 15.2.0: #6738 |
| HHW-22 | Indic init ignores pre-context |
The Indic model | Live | Fixed in 15.2.0: #6713 |
| HHW-24 | stch tiles are shifted when they fit the word exactly |
Joining scripts | Live | Fixed in 15.2.0: #6733 and #6763 |
| HHW-29 | Khmer moves a second COENG + RO in front of the first | Khmer and Myanmar | Live | Fixed in 15.2.0: #6735 |
| HHW-30 | USE: a mark after a space attaches to the space | The Universal Shaping Engine | Live | Fixed in 15.2.0: #6765 |
| HHW-31 | USE: a space doesn’t end a word for topographical forms | The Universal Shaping Engine | Live | Fixed in 15.2.0: #6764 |
| HHW-32 | USE: ZWNJ after a virama doesn’t stop a half form | The Universal Shaping Engine | Live | Declined: #6768 was closed; Indic3 tags are “a novelty only” |
| HHW-33 | Indic: a broken cluster starting with RA + virama loses its reph | Dotted circles and broken clusters | Live | Fixed on main: #6830 |
| HHW-34 | A ZWJ defeats the vowel constraints | Dotted circles and broken clusters | Live | Fixed in 15.2.0: #6767 |
| HHW-35 | The vowel-constraint dotted circle copies the next character’s properties | Dotted circles and broken clusters | Live | Fixed in 15.2.0: #6710 |
| HHW-38 | With GSUB, GPOS, and kerx, kerx never applies and marks stop being zeroed |
AAT positioning | Live | Fixed in 15.2.0: #6761: cross-stream kerx is skipped when GPOS is active |
| HHW-39 | trak vertical tracking is added with the wrong sign |
AAT positioning | Live | Fixed in 15.2.0: #6700, with #6716 for the Core Text font functions |
| HHW-40 | kerx format 4 control-point attachment does nothing with the ot font functions |
AAT positioning | Live | Declined: HarfBuzz doesn’t want its own font functions to answer contour-point queries. #6762, in 15.2.0, writes the callback for the ot font functions but leaves it unregistered, and unregisters FreeType’s too |
| HHW-58 | Cross-stream kerning in legacy kern and kerx raises every later glyph but marks only the pair unsafe to break |
For applications | Live | Fixed in 15.2.0: #6747 |
| HHW-59 | Hangul at cluster level 1 leaves a trailing jamo in its own cluster, unflagged | For applications | Live | Fixed in 15.2.0: #6709 |
| HHW-85 | Vertical kern values are applied with the horizontal sign, so negative kerning moves glyphs apart |
Legacy kern | Live | Fixed on main: #6871 |
Limits and budgets
Places where a limit meant to stop malicious fonts changes the result for valid ones. Limits lists every limit.
| ID | Summary | Chapter | Checked | Upstream |
|---|---|---|---|---|
| HHW-1 | A null or unknown-format Coverage in a format 1 single lookup charges about 2 billion operations to the sanitizer, which then drops the whole GSUB or GPOS | Fonts as bytes | Live | Fixed in 15.2.0: #6696 |
| HHW-9 | Mask bit 30 is never handed out, so 26 bits are free for features, not 27 | From features to lookups | Live | Fixed in 15.2.0: #6697 |
| HHW-13 | Cursive chains that run against the buffer’s direction break after 64 links | GPOS: positioning glyphs | Live | Declined: #6753 was closed; the 64-link limit is kept on purpose |
| HHW-23 | Syllables longer than 64 glyphs are reordered in pieces | The Indic model | Run | Declined: the 64-glyph limit is kept on purpose. #6558, in 15.2.0, keeps the pieces the same in every pass and makes the whole syllable one cluster; this draft’s example is still reordered wrongly at the cut |
| HHW-28 | A CFF charstring with no endchar runs to 200,000 operations and uses up the drawing budget for later glyphs |
Drawing outlines | Run | Fixed in 15.2.0: #6737 |
| HHW-43 | The subsetter’s GSUB closure stops after 14 passes, losing glyphs from long nested chains that shaping reaches | Subsetting | Live | Fixed in 15.2.0: #6757: the closure reaches s20 |
| HHW-44 | HB_CLOSURE_MAX_STAGES is 12, though its comment requires more than the Indic shaper’s 14 pauses |
Subsetting | Read | Fixed in 15.2.0: #6725 |
| HHW-47 | The sanitizer’s operation budget rejects a whole valid GSUB whose few single substitutions cover many glyphs by range | Limits | Run | Fixed in 15.2.0: #6751 |
| HHW-48 | The subsetter’s 256× buffer cap makes a valid subset fail when a tiny table legitimately grows | Writing tables | Run | Fixed in 15.2.0: #6752: the cap is now 256 times the table’s size or 1 MiB, whichever is larger |
| HHW-54 | Texts of 524,289 to 1,048,575 characters go almost unshaped: the operation budget starts negative | Limits | Run | Fixed in 15.2.0: #6664, which raises the operations budget |
| HHW-86 | An AAT DontAdvance loop that runs out of the operations budget doesn’t mark the buffer failed, unlike OpenType | AAT inside HarfBuzz | Live | Fixed on main: #6869 |
Extents, drawing, and subset fonts
| ID | Summary | Chapter | Checked | Upstream |
|---|---|---|---|---|
| HHW-3 | With synthetic bold, grade, or slant, an empty glyph’s extents are <0,-1,-1,1> |
Fonts and font functions | Run | Fixed in 15.2.0: #6685 |
| HHW-4 | Scaled glyph extents are rounded inwards vertically, so the box doesn’t cover the ink | Where metrics come from | Live | Fixed in 15.2.0: #6707 |
| HHW-25 | CBDT format 19 images are never painted | Color | Read | Fixed in 15.2.0: #6754 (reading and painting; the subsetter still writes only index formats 1 and 3) |
| HHW-27 | Point matching in nested composites counts from the wrong start | Drawing outlines | Live | Fixed in 15.2.0: #6749 |
| HHW-36 | hb-vector’s PDF output drops PNG alpha |
hb-vector | Run | Fixed in 15.2.0: #6758 |
| HHW-45 | MATH variants and italics corrections are lost for glyphs that only GSUB produces | Subsetting | Live | Fixed in 15.2.0: #6745 |
| HHW-50 | A reordering custom glyph map breaks PairPos and ClassDef in the subset | Subsetting | Live | Declined: a map that reorders glyphs isn’t supported with layout tables, and #6831, on main, says so in the documentation |
| HHW-51 | Subsetting a symbol font drops its only, (3,0), cmap subtable |
Subsetting | Live | Fixed in 15.2.0: #6746 |
| HHW-52 | The keep-.notdef-outline flag is ignored for CFF |
Subsetting | Live | Fixed in 15.2.0: #6748 |
| HHW-61 | Small instancing differences from fontTools: an avar map one unit off after limiting, a misleading VARC refusal, an unreachable MVAR region |
Instancing | Live | Partly fixed in 15.2.0: the avar map, #6770, and MVAR, #6772; the VARC message was declined (#6766) |
| HHW-66 | hb_color_lerp reverses a color’s bytes, so every PDF sweep, and SVG sweeps that cross 0°, have the wrong colors |
hb-vector | Run | Fixed on main: #6814 |
| HHW-67 | hb-vector’s PDF sweeps leave a square hole at their center, from 16-bit mesh coordinates |
hb-vector | Run | Fixed on main: #6824, and #6836, which sizes each sweep’s mesh to what it paints |
| HHW-68 | hb-vector’s PDF output ignores custom palette colors |
hb-vector | Run | Fixed in 15.2.0: #6804 |
| HHW-69 | hb-vector’s PDF compositing isn’t isolated, so SCREEN and DIFFERENCE blend with the white page |
hb-vector | Run | Fixed on main: #6825 |
| HHW-70 | hb-gpu drops a fill whose only clip is a rectangle, though its comment says rectangles are just ignored | hb-gpu | Run | Fixed on main: #6823 |
| HHW-75 | hb-vector --show-extents and hb-raster --show-extents draw each box after the first at twice its pen position |
The command-line tools | Run | Fixed on main: #6818 |
API and format consistency
The same thing done differently in two places, or defined differently in two documents.
| ID | Summary | Chapter | Checked | Upstream |
|---|---|---|---|---|
| HHW-6 | Three slips in hb-shape-plan.cc: a loop index, a null check after the dereference, a missing null-face guard |
Shape plans and their cache | Read | Fixed in 15.2.0: #6693 and #6698 |
| HHW-7 | FeatureVariations minor version 1 means one thing to HarfBuzz and another to the ISO draft, and a font following the draft loses its GSUB | From features to lookups | Live | Withdrawn: not a bug. The 2026 edition of ISO/IEC 14496-22 defines version 1.1 as HarfBuzz reads it; this draft had compared HarfBuzz with a working draft of the standard |
| HHW-14 | With HB_NO_HINTING, y Device tables fall through into the variation branch, unlike x |
GPOS: positioning glyphs | Read | Fixed in 15.2.0: #6694 |
| HHW-26 | The bitmap tables are tried in one order for images and extents, the other for painting | Color | Read | Fixed in 15.2.0: #6723 |
| HHW-37 | Smaller hb-vector and hb-gpu differences: PDF gradients that only pad, palette functions with other types than their twins, stale comments |
hb-vector, hb-gpu | Read | Partly fixed in 15.2.0 and on main: #6691, in 15.2.0, corrects the stale comments and documentation, and #6863, on main, makes PDF gradients repeat and reflect; the API differences were declined, as harmless |
| HHW-41 | Of two requests for one feature, AAT keeps the first and OpenType the last | AAT inside HarfBuzz | Live | Fixed in 15.2.0: #6714 |
| HHW-55 | HB_LEAN removes drawing and painting in every Meson build |
Compile-time configuration | Run | Fixed in 15.2.0: #6724 |
| HHW-56 | hb-features.h never defines HB_HAS_GPU or HB_HAS_GRAPHITE |
Compile-time configuration | Run | Fixed in 15.2.0: #6721 and #6722 |
| HHW-62 | hb_style_get_value returns OS/2 optical sizes in twentieths of a point |
Other tables | Live | Fixed in 15.2.0: #6695 |
| HHW-63 | BASE min/max: missing values read as 0, and MinMax without BaseValues hides DFLT |
Other tables | Run | Partly fixed in 15.2.0: #6750 fixes the missing values; the rest was declined: a script record without BaseValues defines no baselines, and HarfBuzz doesn’t fall back to DFLT for it |
| HHW-64 | STAT::get_value takes the first axis value, and STAT suppresses synthetic slant |
Other tables | Live | Partly fixed in 15.2.0: #6743 fixes the synthetic slant, and #6755 adds the sibling flag and format 4; the rest was declined: between two unmarked values STAT doesn’t say which is the font’s own, and HarfBuzz doesn’t guess |
| HHW-72 | HB_FEATURES_H is both harfbuzz-world.cc’s header name and hb-features.h’s include guard, so Meson’s header can’t be named |
Building HarfBuzz | Run | Fixed on main: #6815 |
| HHW-77 | Smaller things in the build: Graphite in the single-file build, the libs target without hb-gpu, meson build without setup, an undefined HAVE_ISATTY |
Building HarfBuzz | Run | Fixed on main: #6820, #6821, and #6819, after the Graphite item, #6722, in 15.2.0 |
| HHW-79 | hb_directwrite_font_set_funcs takes a reference to the DirectWrite font face that nothing releases, where the Core Text version takes none |
Integrations | Read | Fixed on main: #6812 |
| HHW-80 | _hb_gdi_reference_table returns before its ReleaseDC guard when SelectObject fails, leaking the screen DC |
Integrations | Read | Fixed on main: #6811 |
| HHW-82 | USE: the generator’s list of generic bases (U+2015, U+2022, U+25FB to U+25FE) never applies, and they come out O |
The Universal Shaping Engine | Run | Fixed on main: #6870, which closed issue #6828 |
| HHW-84 | The Core Text face loader fails for a font with named instances or several faces and no PostScript name, a regression in 15.2.0 | Integrations | Run | Fixed on main: #6872 |
Documentation and messages
| ID | Summary | Chapter | Checked | Upstream |
|---|---|---|---|---|
| HHW-2 | The “start table GPOS” trace message prints GSUB’s chosen script | Choosing a script shaper | Live | Fixed in 15.2.0: #6686 |
| HHW-42 | hb-depend: errors in its header and design notes, a declared function that doesn’t exist, a wrong build option in the fuzzing README | hb-depend | Run | Fixed in 15.2.0: #6703, #6692, #6744, and #6745 |
| HHW-46 | hb_set_invert is documented as “Since: 3.0.0”, but NEWS has it before 1.6.1 |
Reading HarfBuzz’s C++ | Read | Fixed in 15.2.0: #6690 |
| HHW-49 | docs/serializer.md and docs/repacker.md are out of date |
Writing tables | Read | Fixed in 15.2.0: #6702 |
| HHW-53 | Small faults in the data generators, none affecting the tables | Regenerating the tables | Read | Fixed in 15.2.0: #6688, #6689, #6715, #6739, and #6740, except the www-01.sil.org citation, which is kept on purpose |
| HHW-57 | Configuration macros and limits defined but unused, or used but undocumented | Compile-time configuration | Read | Partly fixed in 15.2.0: #6728, #6727, and #6759; the rest was declined: CONFIG.md leaves the full list of HB_NO_* macros to hb-config.hh, and the four budget weights that nothing uses, new in 15.2.0, complete a ladder |
| HHW-60 | hb-shape --text-before echoes its value to stderr |
For applications | Run | Fixed in 15.2.0: #6687 |
| HHW-65 | Smaller things in name, BASE, and MATH: hb-info --list-names, a sign error, a quadratic risk, a missed script tag |
Other tables | Live | Partly fixed in 15.2.0: #6708, #6741, and #6760; the ltag item was declined: the name API returns interned languages, and what one font can add is bounded |
| HHW-71 | hb-gpu’s stem darkening is documented, and used by its viewer, with pixels per font unit for its ppem | hb-gpu | Read | Fixed on main: #6832, which closed issue #6827 |
| HHW-73 | hb-shape -v turns on --ned as well as --verbose |
The command-line tools | Live | Fixed on main: #6813 |
| HHW-74 | --features and --variations split at spaces, so the CSS forms their help offers don’t work |
The command-line tools | Run | Fixed on main: #6822 |
| HHW-76 | Smaller things in the renderers: hb-raster’s HSL luminosity weights, stale hb-vector and hb-gpu documentation | hb-raster, hb-gpu | Run | Fixed on main: #6816, #6817, and #6826, after #6806 in 15.2.0 |
| HHW-78 | Smaller things in the command-line tools: --font-size help, an unused refuse_tty, hb-fc-list -V |
The command-line tools | Run | Fixed on main: #6819 |
| HHW-81 | Smaller things in the integration documentation: hb_ft_font_set_funcs and hb_ft_hb_font_changed, swapped cairo scale factors, missing Since: lines, NEWS for 11.0.0, the user manual’s integration chapter |
Integrations | Read | Partly fixed on main: #6817 and #6821; the NEWS item for 11.0.0 was declined: old release notes stay as they are |
| HHW-83 | The user manual’s Configuration options leave out HarfBuzz’s own libraries and backends, and name the deprecated graphite option |
Compile-time configuration | Read | Fixed on main: #6868 |
Of the 86 drafts, 45 were shown live in the book, 25 were run outside it, and 16 were found by reading. One, HHW-7, is withdrawn. Of the other 85, 53 have been fixed in 15.2.0 and 20 more on main; seven are partly fixed, with what is left of each declined; and five were declined. None is open. The book now describes 15.2.0, so its live blocks show the fixes that 15.2.0 made, and the chapters note the fixes made on main since.
In short
- Writing the book turned up 86 draft bug reports, HHW-1 to HHW-86, all but the last three reproduced on HarfBuzz 15.1.0. Two are on HarfBuzz’s issue tracker, and one is withdrawn; 53 are fixed in 15.2.0 and 20 more on
main, and none is open. - Each was shown live in a chapter, run outside the book, or found by reading the code, and the last column says what has happened to it upstream.
- The numbers are permanent: HarfBuzz’s pull requests cite them.