MacArthur, Ian (SELEX) (UK) wrote:
> Sounds like a fine idea to me - if you have "worked examples" of how you
> see it coded, I might be able to work it into "my" 1.1.8-utf8 hack
> too...

        I don't have code yet, but this subject was discussed in this thread
        a few months ago on fltk.dev:
        
http://fltk.org/newsgroups.php?gfltk.development+T+Q%22RFC%3A+Global+font+size+offset%22

        I /think/ it might be easy to:

                1) Add a 'font size offset' global,

                2) modify the text drawing routines to dynamically add that 
value to the
                   current fl_size() on the fly to calculate the actual drawing 
size.

        ..at least, that's how I'd 'hack' it in there. There might be a cleaner
        way to do this though, not sure.

        That technique is also a /little/ unclean, because it means calls to
        int fl_font(void) wouldn't return the actual font size being drawn,
        which might mess up things like font measuring, and whatnot, unless that
        too includes the new 'font offset'.

        Have to admit I don't know much about the font drawing stuff in fltk,
        so I'm not sure what the clear path is to doing this 
implementation-wise.
        But surely it should be as easy as a single global integer offset for 
fltk 1.x,
        and should probably be a float in fltk 2.x..
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to