freetype
[Top][All Lists]
Advanced

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

[Freetype] freetype tutorial & gdk/gtk


From: Bryan Buchanan
Subject: [Freetype] freetype tutorial & gdk/gtk
Date: 29 Aug 2002 18:00:20 +1000

Hi,

I trying to get the freetype tutorial demo working using Gdk/Gtk

I've replaced this function from the tutorial

 // now, draw to our target surface
  my_draw_bitmap( &slot->bitmap,
     pen_x + slot->bitmap_left,
     pen_y - slot->bitmap_top );

with this Gdk function,

  gdk_draw_gray_image(widget->window,
    widget->style->black_gc,
    pen_x, pen_y,
    32, 32,
    GDK_RGB_DITHER_NORMAL,
    slot->bitmap.buffer,
    slot->bitmap.pitch);

where widget is a GdkDrawingArea, and I created a 32 pixel font with

  error = FT_Set_Pixel_Sizes(
     face,   // handle to face object
     0,      // pixel_width
     32 );   // pixel_height

This works to the extent that I can see the characters displayed, but
not correctly, so there's obviously something not quite right.

Can anyone point me in the right direction (code samples ?)

Thanks,

Bryan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]