get font to render correctly. Things work fine now that I am using the
2002-12-04 James Henstridge <james@daa.com.au> * src/font-view.c (main): get font to render correctly. Things work fine now that I am using the same FT_Library handle as Xft was ...
This commit is contained in:
parent
f7d99a3058
commit
9f2d67d4d0
3 changed files with 9 additions and 8 deletions
|
@ -1,5 +1,9 @@
|
|||
2002-12-04 James Henstridge <james@daa.com.au>
|
||||
|
||||
* src/font-view.c (main): get font to render correctly. Things
|
||||
work fine now that I am using the same FT_Library handle as Xft
|
||||
was ...
|
||||
|
||||
* src/font-view.c (main): start of simple font viewer program.
|
||||
Doesn't correctl display the text yet though :(
|
||||
|
||||
|
|
|
@ -64,13 +64,12 @@ main(int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
error = FT_Init_FreeType(&library);
|
||||
if (error) {
|
||||
g_printerr("could not initialise freetype\n");
|
||||
if (!XftInitFtLibrary()) {
|
||||
g_printerr("could not initialise freetype library\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
error = FT_New_Face_From_URI(library, argv[1], 0, &face);
|
||||
error = FT_New_Face_From_URI(_XftFTlibrary, argv[1], 0, &face);
|
||||
if (error) {
|
||||
g_printerr("could not load face '%s'\n", argv[1]);
|
||||
return 1;
|
||||
|
@ -82,13 +81,10 @@ main(int argc, char **argv)
|
|||
NULL);
|
||||
font = XftFontOpenPattern(GDK_DISPLAY(), pattern);
|
||||
if (!font) {
|
||||
g_printerr("could not load face\n");
|
||||
g_printerr("could not load Xft face\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
g_message("ascent=%d, descent=%d, height=%d",
|
||||
font->ascent, font->descent, font->height);
|
||||
|
||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title(GTK_WINDOW(window), "Foo");
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ vfs_stream_close(FT_Stream stream)
|
|||
{
|
||||
GnomeVFSHandle *handle = (GnomeVFSHandle *)stream->descriptor.pointer;
|
||||
|
||||
g_message("closing vfs stream");
|
||||
if (!handle)
|
||||
return;
|
||||
gnome_vfs_close(handle);
|
||||
|
|
Loading…
Add table
Reference in a new issue