Re: NSGlyph, NSBezierPath questions
Re: NSGlyph, NSBezierPath questions
- Subject: Re: NSGlyph, NSBezierPath questions
- From: Aki Inoue <email@hidden>
- Date: Fri, 7 Dec 2001 13:48:48 -0800
Raphael,
- I would like to translate the glyph so that its baseline is located
at y=0.0 (I mean the glyphs of the first line of text). What I get now
is that the glyph is too high and I don't know by how much I have to
translate it. Is there a method for that ?
With the current API set, you cannot get the baseline offset outside of
NSLayoutManager. We have a plan to fix this in a future release.
- When parsing glyphs corresponding to a sentence, I get a "square
frame" glyph on \n characters (and perhaps some others too). Of course
I don't want them, so, is there a way to skip (or identify) those
"non-representable" characters/glyphs ?
You can filter out those control glyphs used by the kit by comparing
against the number of glyphs in the font. If the glyph id is larger
than or equal to the number of glyphs, you don't want to render it.
Aki
On 2001.12.07, at 02:07, Raphael Sebbe wrote:
Hi all,
I am currently working on glyph generation as bezier paths and it has
worked quite well so far. I still have some questions:
- I would like to translate the glyph so that its baseline is located
at y=0.0 (I mean the glyphs of the first line of text). What I get now
is that the glyph is too high and I don't know by how much I have to
translate it. Is there a method for that ?
- When parsing glyphs corresponding to a sentence, I get a "square
frame" glyph on \n characters (and perhaps some others too). Of course
I don't want them, so, is there a way to skip (or identify) those
"non-representable" characters/glyphs ?
Note that I don't use the NSBezierPaths for drawing but instead process
them for generating some other geometry, so NSLayoutManager drawing
methods (drawGlyphs...) are irrelevant here.
Thanks,
Raphael
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev