[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Aug 17 02:57:00 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

--- Comment #33 from lightside <lightside at gmx.com> ---
(In reply to comment #32)
> Yes that's right at the moment. But trying to get a cleared one...
Possible to use following Python script to create test.pdf file, based on
TrueType font.ttf in the same directory and installed print/py-reportlab port
(tested for v3.2.0):
-8<--
import reportlab.rl_config
#reportlab.rl_config.warnOnMissingFontGlyphs = 0
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
pdfmetrics.registerFont(TTFont("EmbeddedFont", "font.ttf"))
from reportlab.pdfgen import canvas

text="The quick brown fox jumps over the lazy dog"
c = canvas.Canvas("test.pdf")
size=32
c.setFont("EmbeddedFont", size)
c.drawString(20, 800, "EmbeddedFont, %s:" % size)
c.drawString(20, 760, text)

size=26
c.setFont("Helvetica", size)
c.drawString(20, 720, "Helvetica, %s:" % size)
c.drawString(20, 680, text)
c.showPage()
c.save()
-->8-

% python2.7 create_pdf.py
% convert -verbose -alpha remove test.pdf image.jpg

But other font types may need other methods to use.

(In reply to comment #32)
> Ok, does it help if I upload the debug output of freetype2?
I guess, that the simple answer is no, unless this was asked by concrete
developer, who may understand such debug output and try to fix something,
without actual pdf file or font(s) to test.
But you can try to provide such debug output for VER-2-8-1 (where there was no
issue):
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tag/?h=VER-2-8-1
VER-2-9-1 (where issue was found):
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tag/?h=VER-2-9-1
and latest master commit on (in case of extended debug output for latest
development version and possible fix to test):
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/
if such developer asked about this. Probably, other developers also may find
some useful information in it, if freetype2 debug output is available for new
issue. But I can't say about private information for such output. So, you may
need to determine this by yourself (or ask others about this).

Another answer was "I need a PDF (unencrypted) or its embedded fonts that I can
further analyze.", which was said by Werner Lemberg: 
https://savannah.nongnu.org/bugs/?53739#comment2
after some pdffonts output on:
https://savannah.nongnu.org/bugs/?53739#comment1
and, I guess, developer didn't have such embedded font(s) available to test on
this stage.

Personally, I provided some freetype2 debug output for previous issue, after it
was confirmed for print/ghostscript9-agpl-base v9.16 and print/freetype2 v2.9.1
on FreeBSD. Later it was confirmed, that previous issue was fixed after update
of print/ghostscript9-agpl-base to 9.23 version in ports r472239. The
Ghostscript v9.23 was used by Werner Lemberg to test for provided
anonyme_visitenkarte.pdf file, which is possible reason why previous issue
wasn't confirmed (the print/ghostscript9-agpl-base was v9.16 at this time):
https://savannah.nongnu.org/bugs/?53739#comment3

Need to mention again, that (automated) git bisect found
75cb071b3fbfa2315c5d458fee2bb465a14568ae commit (see comment #3):
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=75cb071b3fbfa2315c5d458fee2bb465a14568ae
There is some patch to test (attachment #193012) for previous issue. Possible
to test this for new issue, if repeat commands in previous comment(s), but for
new test.pdf, instead of previous anonyme_visitenkarte.pdf (may need to change
values for TEST_SOURCE and expected_checksum variables in test.sh script from
attachment #194200). The git bisect may find another commit, of course.

The current latest Ghostscript release version is 9.23
(https://ghostscript.com). If developers still use such release version, then
there is a possibility, that they can confirm new issue and try to investigate,
propose some fix(es), in which case need to test development version(s) of
affected software, but currently only reporter(s) may confirm (and try to fix)
this, if I understood this correctly.

Sorry for the long comment.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.


More information about the freebsd-gnome mailing list