https://bugs.documentfoundation.org/show_bug.cgi?id=89252
Bug ID: 89252
Summary: font width affected by previous use of synthetic bold
Product: LibreOffice
Version: PreBibisect
Hardware: Other
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: graphics stack
Assignee: [email protected]
Reporter: [email protected]
Created attachment 113251
--> https://bugs.documentfoundation.org/attachment.cgi?id=113251&action=edit
Zip containing several example documents and PDF evidence.
When a graphite font without a physical fontfile for bold or italics is used,
the character width depends on how it was “first used”. Using the same
font/size in a different, separate document can also affect the layout. This
bug affects Linux (since before version 3.5), but not Windows.
For example, if I type a-z in bold Andika font, and then type it again as a
regular Andika font, the regular character widths will be just as wide as the
bold widths - taking up a lot more space on the line than it should. “First
used” refers to LibreOffice as a whole - so if in an earlier-opened document
the font was used, then the second document's layout width will be affected by
the first document.
Linux instructions for installing the Andika Compact font used in the example
document can be found here:
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika_download
A work-around is to start LibreOffice with “SAL_DISABLE_GRAPHITE=true soffice”.
The attached PDF shows the following results:
Page 1: Bug evidence - bold and regular take up the same width in the test
document.
Page 2: SAL_DISABLE_GRAPHITE workaround applied - fixes the problem.
Page 3: simply displays the contents of the “first document” which causes
LibreOffice to cache regular width font sizes for each alphabet letter.
Page 4: evidence that the “first document” font cache affects the width of the
test document. The bold characters are now “squished” because they are using
the regular width.
The developer can see the problem using this code...
file: vcl/generic/glyphs/graphite_serverfont.cxx
function: float freetypeServerFontAdvance(const void* appFontHandle, gr_uint16
glyphId)
SAL_WARN("DEBUG","caching
fontwidth["<<pServerFont->GetGlyphMetric(glyphId).GetCharWidth()<<"] for
["<<glyphId<<"] font["<<pServerFont->GetFontFileName()<<"]");
This appears to be a bug in the integration code for SIL's graphite library. I
have noticed the bug occurring while using SIL's Andika, Doulos, and
GentiumPlus font familes. Based on the output of the debugging line, I would
suggest that this bug only occurs where synthetic bolding (or italics?) occurs.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs