[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: ANN: Emacs on GNUstep / OS X 8.0-rc1
From:
Adrian Robert
Subject:
Re: ANN: Emacs on GNUstep / OS X 8.0-rc1
Date:
2005年3月09日 15:20:05 -0500
On Mar 9, 2005, at 2:36 PM, Fred Kiefer wrote:
Adrian Robert wrote:
On Mar 8, 2005, at 10:15 AM, M. Uli Kusterer wrote:
At 16:42 Uhr -0500 07.03.2005, Adrian Robert wrote:
http://emacs-on-aqua.sf.net/
Status respecting backends on GNUstep is unchanged: works on Xlib,
has
rendering anomalies under Art. Specifically, menus are rendered
blank
when they change, and the letter 'f' is rendered in proportional
spacing
(from NSString -drawAtPoint:withAttributes:) in all fonts tried (in
some
cases the character after the 'f' must be 'i' or another 'f').
"defaults write Emacs GSBackend libgnustep-xlib" is necessary.
Not sure whether you already know the source of the "f" problem and
simplified the explanation, or whether you don't know where this
comes from, but this looks to me like ligatures are turned on where
they shouldn't. Ligatures are a typographical fanciness for
representing certain character pairs with a single character that
looks like an amalgamation of the two. Often done for fi, fl and a
few others.
I think there should be a way to turn of ligatures, but you may
have to use the Cocoa text system directly instead of using
NSString's drawAtPoint:.
Yes, the rendering issue did have to do with ligature, but the fault
is not in Art, but in GUI. Art just reveals the issue because it
implements ligature whereas Xlib does not.
The problem is in [GSLayoutManager -_run_cache_attributes], where it
currently sets a glyph run's 'ligature' attribute by default to '1'.
Either it should set this to '0' if the font is monospaced, or some
lower level should ignore ligature=1 for fixed fonts.
Not sure if this really is the problem. Having the ligature attribute
at 1 is some sort of default value, meaning: use ligatures as much as
suitable for the font. The back art code tries to only use ligatures
if they are available. I would rather expect that the code there
somehow fails (_generateGlyphsForRun:at:). Or are you saying that you
are using a monospaced font which has ligatures available as well? But
even then, where would be the problem?
Looks like somebody needs to dig deeper into the art font handling to
find out.
Somebody more experienced than myself may have more to say here, but
back-art first does this:
ligature_fi = FTC_CMapCache_Lookup(ftc_cmapcache, &cmap, 0xfb01);
then later on uses ligature_fi if it is non-null and the ligature
attribute is 1.
I guess FTC_CMapCache_Lookup() is some freetype thing? If so, then it
appears monospaced fonts CAN have ligatures set for them. In any case,
a monospaced font is often used precisely because of its property that
each character consumes the same amount of space, so you can organize a
text area like a grid, line up columns, etc.. Accordingly, on OS X,
ligatures are not displayed for monospaced fonts, even those that say
isFixedPitch=NO and don't show up in the font panel under "Fixed
Width". This is true even if I force ligatures on using string
attributes.
So Art should probably explicitly ignore the ligatures even if it finds
them for monospaced fonts.