[Drawkit] changing font
James Maxwell
jbmaxwell at rubato-music.com
Thu Jun 26 14:19:43 PDT 2008
Okay, false alarm... I found the problem. Kind of strange, though.
I had set the font variable in my init code using a simple assignment.
When I changed this to using the actual accessor -setGlyphFont: it
worked properly. Does anybody understand why that would be? I'm glad I
solved the problem, but it's a little disconcerting that I don't
actually know *why* my solution worked. :-\
My best guess is that some super class uses Helvetica as a default
(maybe NSObject holds a reference to some system font, somewhere?).
Anyway, problem solved, for now.
-----------------------------------
On another note, I'm trying to refine this process of using glyphs for
objects - these are all music notation objects, taken from a free
music font - and I have one big question. Does anyone know if there's
a simple way to have a DKDrawableShape adopt the bounds of a glyph?
I'm finding I'm tweaking around a lot with these glyphs, trying to get
them to draw properly, and to fit within the selection bounds of my
DKDrawableShape, but it seems like there must be an easier way.
thanks,
J.
On 26-Jun-08, at 1:51 PM, James Maxwell wrote:
> Hello All,
>
> I'm going a bit insane here...
>
> I've got a DKDrawableShape, with a path made from a Glyph. When I
> create the object, the font is what I set it up to be in my object
> creation tool. But when I click on the object, to select it once
> it's already entered, the font mysteriously changes to "Helvetica
> 10.00 pt"... What's up with that??
>
> I'm assuming this is a default font coming from somewhere, but
> where, and why?
>
> As a note, I need to be able to change the appearance of this base
> object, basically by changing its font, glyph, and size. So, when I
> instantiate the object I use some basic accessors to set the glyph
> and font. These accessors are never given Helvetica as a font...
>
> Any thoughts very much appreciated.
>
> J.
>
> _______________________________________________
> Drawkit mailing list
> Drawkit at lists.apptree.net
> http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net
More information about the Drawkit
mailing list