GNU bug report logs -
#35781
Make Cairo build obey hint-style font setting
Previous Next
Reported by: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Date: Fri, 17 May 2019 17:40:01 UTC
Severity: wishlist
Found in version 27.0.50
Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Bug is archived. No further changes may be made.
Full log
Message #36 received at 35781 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, 22 May 2019 04:03:25 +0900,
Kévin Le Gouguec wrote:
>
> mituharu <at> math.s.chiba-u.ac.jp writes:
>
> > I tried making ftcrfont_open look much like xftfont_open.
> > Could you try the attached patch?
>
> Thank you for this patch!
>
> I applied it on top of cb367c8e0d, and AFAICT this fixes the issue: on
> both setups where I used to see a difference in hint style[1], the
> fonts now look the same (i.e. with slight hinting). Things haven't
> deteriorated on the third setup[2].
Thanks for testing. An updated patch is attached.
> I glanced at your patch to try and get a sense of how things worked;
> from what I can tell you moved some logic from xftfont.c to ftfont.c,
> which is used by ftcrfont.c, so the XFT and Cairo build would use more
> common code?
>
> (Is there a reason why you left xftfont_add_rendering_parameters in
> xftfont.c despite adding ftfont_add_rendering_parameters in ftfont.c?
> Should this function be added to ftfont.h so that xftfont.c gets rid
> of its duplicate implementation?)
I've overlooked it at the last minute change for xftfont.c. It is
fixed in the updated one.
> (Also, I see you removed some code related to the bitmap_strike_index
> and ft_size_draw members of struct font_info; is it because whatever
> this code was doing is now handled by… something else in ftfont.c?)
Screening bitmap fonts from passing them to ftfont functions in
ftcrfont_get_bitmap, ftcrfont_anchor_point, and ftcrfont_shape is
resurrected by a new member bitmap_position_unit, which is primarily
introduced for HarfBuzz, in the updated patch. The member
ft_size_draw is removed because it was a workaround in the previous
design.
In the updated patch, ftfont_open2 is merged into ftfont_open just as
before the introduction of the cairo drawing code, because they are no
longer used in cairo.
I'll push the updated one to master and also adapt it for the harfbuzz
branch in 15 hours or so.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
[xft-like-ftcr.diff (application/octet-stream, attachment)]
This bug report was last modified 6 years and 83 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.