[cairo-bugs] [Bug 23539] New: bitmap font is not scaled by cairo_scale()
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Aug 27 02:23:34 PDT 2009
http://bugs.freedesktop.org/show_bug.cgi?id=23539
Summary: bitmap font is not scaled by cairo_scale()
Product: cairo
Version: 1.9.3
Platform: All
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: freetype font backend
AssignedTo: david at freetype.org
ReportedBy: ginn.chen at sun.com
QAContact: cairo-bugs at cairographics.org
CC: ajohnson at redneon.com
Created an attachment (id=28944)
--> (http://bugs.freedesktop.org/attachment.cgi?id=28944)
cairo_bitmap_font_scale.c
This bug was reported as bug 18001 about 1 year ago.
Actually it is not only reproducible with PS backend, but also with image and
PDF backend perhaps all backend.
It is not only reproducible with freetype fonts either. I can reproduce it with
Windows. See (https://bugzilla.mozilla.org/show_bug.cgi?id=448186)
However I filed this bug against freetype font backend, because I think
different font backend may require different fixes.
Please correct me if I were wrong.
Steps to reproduce:
1) Enable bitmap font on Ubuntu or use Solaris.
See: http://www.alanbriolat.co.uk/2009/04/enable-bitmap-fonts-on-ubuntu-jaunty/
2) Run fc-match Courier
Make sure you get a *.pcf or *.pcf.gz file.
3) Compile and run attached cairo_bitmap_font_scale.c.
4) If you change "Courier" to a non bitmap font, the result is correct.
I've proposed a draft fix half a year ago in mozilla bug 448186.
Attached try.patch.
However I don't think it's the right fix.
If we do _transform_glyph_bitmap() there, it will make the glyph unreadable if
it is scaled down to 50% or 30%.
For PS, if we use "scale" operator inside "/Glyphs", we can get a better
result.
(suggested by Adrian Johnson in
https://bugzilla.mozilla.org/show_bug.cgi?id=448186#c7)
But I don't know how should I pass the "CTM" through "scaled_glyph".
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the cairo-bugs
mailing list