khaledhosny / harf

A HarfBuzz-based font loader and shaper for HarfTeX
GNU General Public License v2.0
10 stars 1 forks source link

Handle over/underfull box messages in a better way #26

Closed khaledhosny closed 5 years ago

khaledhosny commented 5 years ago

I see stuff like:

Underfull \hbox (badness 1902) in paragraph at lines 874--874
[] [][][]\TU/Sanskrit2003NM(1)/bx/n/12 �
warning  (print): bad raw byte to print (c=280), skipped

warning  (print): bad raw byte to print (c=281), skipped

warning  (print): bad raw byte to print (c=1157), skipped

Looks like LuaTeX is trying to print the glyph node’s char fields, which (mis)use as glyph indexes and contain invalid Unicode characters. We need to figure out what is best to be shown here (by e.g. checking XeTeX) and see if we can make LuaTeX show that.

khaledhosny commented 5 years ago

There is hpack_quality and vpack_quality callbacks that allow us to override the messages, we probably show implement them. XeTeX just prints the characters of the native word nodes, we will need a way to get the actual characters of our nodes not the glyph indexes.