mirror of
https://github.com/dolanmiu/docx.git
synced 2026-12-01 16:55:59 +01:00
* feat(layout): measure the bold Word makes itself, letters a font lacks and more characters in Office's fonts, as Word does Round 25's font probes, saved from Word 16 for Mac, settle what Office's fonts still stopped at: - word-stops-office-fonts MB1 to MB3: the bold Word makes itself for Calibri Light, Franklin Gothic Book and Impact draws each glyph 20 thousandths of an em further on than the regular at 8 to 72 points, the spaces as wide, kerned and joined as the regular, its lines as tall. The width tables now have it, from the generator. - FB1, FB2: the font Word draws a letter a font lacks in doesn't depend on the run's language or East Asian font, and the line takes its ascent and descent. The width tables say which face of the tables Word draws each such letter in, where it is Calibri, Cambria, Arial, Times New Roman or Tahoma, and a line makes room for it. - KL1: text with ligatures isn't kerned in a font kerned by its kern table alone, whichever ligatures it has. - word-stops-more-widths-office and word-stops-more-italic-widths: Hebrew, Thai, box drawing, shapes, symbols and dingbats in Office's other fonts and in the five fonts' italics, as Word draws them. - DS and word-stops-font-heights: font files' lines are as tall as their hhea tables make them, and go their descender below the baseline. Font files whose GPOS table doesn't kern Latin text are kerned by their kern table, and not with ligatures. MB4 showed Word drawing Pacifico, which the document embeds, in Office's own copy of it, so bold text in a font given or embedded without a bold face still stops. * fix(layout): report KL lines the office-fonts reader doesn't find, rather than stopping word-stops-office-fonts.py indexed the kerning of a KL1 line, and the words of KL2's, without checking it found the line whole, so a PDF without one, or with one Word broke, stopped the reader before KL2 and DS. They now print "not found", as MB does.