[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Font size and screen resolution



On 30 Jan 2002, Lars Clausen wrote:

> On Wed, 30 Jan 2002, Jason Maiorana wrote:
> 
>> 
>>>I seems I am officially in charge of font handling now, due to trying
>> to
>>>hack up FreeType support:)  I'm trying to get away from the frankly
>>>horribly hard-coded font list in there now, but I'm having trouble with
>> the
>>>ctual rendering for FreeType.  I'm guessing the trouble you see lies in
>>>suck_font, yes?  I shall have to investigate what FreeType does at
>>>differing resolutions.
>> 
>> 
>> Out of curiousity, could you go into a little detail about the
>> difficulty you are having with freetype.
> 
> Absolutely!  Any help is welcome:)
> 
> All the fun is in lib/font.c, inside #ifdef HAVE_FREETYPE.  In
> freetype_load_string(), I manage to find the size of the string, and that
> seems ok.  In freetype_render_string(), I have FreeType render into its
> bitmaps, and then I call freetype_copy_glyph_bitmap() to copy that into
> the Dia pixmap.  However, the actual copy operation
> (gdk_draw_gray_image()) bombs.  It's been a while since I've looked at
> it, I'm thinking there's a disagreement on bitmap layouts between GDK and
> FreeType.  I'm also slightly worried that the bitmap size I get from FT
> for a single glyph is 263786x50.

This has now been fixed, it was some pointer error that I'd missed
(freetype does a great job of totally confusing the user about what is a
pointer and what is not:).  I can now render the text, except it's inverted
and longer than it should be:)

> What's also odd is the difference between the height used for finding
> bounding boxes etc, and that used when drawing -- the renderer uses
> renderer->font_height, which is ddisplay_transform_length()ed, but
> calc_width() seems to ignore the renderer and the transformation.

I shall have to look closer into this now.  The bounding box is not what it
should be.

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| Hårdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK