[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft] Suggestion/Inquiry: keeping metrics.horiAdvance for emboldened fixe
From: |
Raimund Steger |
Subject: |
[ft] Suggestion/Inquiry: keeping metrics.horiAdvance for emboldened fixed-width fonts |
Date: |
Thu, 19 Feb 2015 00:53:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; SunOS i86pc; rv:17.0) Gecko/20140429 Thunderbird/17.0.11 |
Hi,
there has been a discussion on the fontconfig mailing list about
artificially emboldened fixed-width fonts (this one:
http://thread.gmane.org/gmane.comp.fonts.fontconfig/5372).
The issue that has been brought up -- not for the first time -- is that
some text editors use bold face for syntax highlighting, and if said
editors happen to use a font that has no native bold variant (Droid Sans
Mono, Inconsolata, Lucida Console) the characters will not align between
the lines as FreeType adds emboldening strength to the horizontal
advance width which many toolkits use without modification (not terminal
emulators though! as I've found, but... the rest).
I don't at all disagree with the current implementation in terms of
aesthetics, but I suppose one could say that keeping monospace text in
its proper grid (in the face of users who don't want to configure a lot)
constitutes something like a higher cause...
Anyway. We found that older Infinality patches implemented a change to
this exact advance width calculation that just disabled it if
FT_FACE_FLAG_FIXED_WIDTH was set. Newer versions then started disabling
it unconditionally, but I think that would be taking it a little too far.
Attached is a patch that's about what I have in mind.
Now I have little experience what weight such a change would carry in
the FreeType world, whether the patch even addresses the right spot in
the code, and if it's something you would consider acceptable in terms
of looks (in particular, I haven't tested emboldened bitmap fonts), and
... let's say rendering stability (I mean creating reproducible images
across FreeType versions. I've spotted a discussion in the mailing list
archive that suggests that some people are very serious about this).
Still I thought it'd be worth a suggestion before some distributions
started disabling the feature for monospace fonts through their
fontconfig setup...
-Raimund
--
Worringer Str 31 Duesseldorf 40211 DE home: <address@hidden>
+49-179-2981632 icq 16845346 work: <address@hidden>
emboldenmono.diff
Description: Text document
- [ft] Suggestion/Inquiry: keeping metrics.horiAdvance for emboldened fixed-width fonts,
Raimund Steger <=