[Gnome-print] incompatible font changes
- From: Lauris Kaplinski <lauris helixcode com>
- To: gnome-print helixcode com
- cc: gnome-devel-list gnome-org
- Subject: [Gnome-print] incompatible font changes
- Date: Fri, 21 Jul 2000 13:06:30 +0200 (CEST)
Hello
I hope, this is last incompatible change in gnome-font subsystem:
1. GnomeDisplayFont is now typedef of GnomeRFont. To access attributes,
use methods:
gnome_display_font_get_face (const GnomeDisplayFont * gdf);
gnome_display_font_get_font (const GnomeDisplayFont * gdf);
gnome_display_font_get_scale (const GnomeDisplayFont * gdf);
gnome_display_font_get_x_font_name (const GnomeDisplayFont * gdf);
gnome_display_font_get_gdk_font (const GnomeDisplayFont * gdf);
Better yet, modify code, to use gnome_rfont_render_xxx_gdk_drawable
The latter at moment does not use X fonts at all, but we can easily modify
it, so if:
- transformation matrix is uniform scaling
- font is available for x
- color is solid
- antialiasing is not needed
it can draws, using standard X fonts, otherwise uses pixmaps.
2. GnomeFontSelection and GnomeFontDialog return GnomeFont, instead of
GnomeDisplayFont.
The logic should be obvious: GnomeDisplayFont is scaled to certain pixel
size, but dialog should determine only font master size.
To get RFont (== DisplayFont) for drawing:
GnomeFont * font;
GnomeRFont * rfont;
gdouble affine[6];
font = gnome_font_selection_get_font (sel);
art_affine_scale (affine, zoomx, -zoomy); /* Or use non-trivial affine */
rfont = gnome_font_get_rfont (font, affine);
gnome_font_unref (font);
Dialog font sample is a bit ugly at moment, and usually crashes for
symbol fonts. I correct that ASAP.
Regards,
Lauris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]