From: <kr_...@us...> - 2003-08-24 19:02:47
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK In directory sc8-pr-cvs1:/tmp/cvs-serv18393/port/src/cbits/GTK Modified Files: Canvas.c Font.c Log Message: The new defaultFontDef function now returns the default font which is specified in Windows. The defaultPen function is renamed to windowPen and now the window and dialog pens have colors whichs are given from Windows settings. Index: Canvas.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Canvas.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Canvas.c 13 Jul 2003 16:12:43 -0000 1.12 --- Canvas.c 24 Aug 2003 19:02:45 -0000 1.13 *************** *** 512,516 **** static void osSetupFont(FontHandle font, int len) { ! if (font->IsUnderlined || font->IsStriked) { PangoAttribute *attr; --- 512,516 ---- static void osSetupFont(FontHandle font, int len) { ! if (font->style & (FONT_UNDERLINED | FONT_STRIKED)) { PangoAttribute *attr; *************** *** 520,524 **** attr_list = pango_layout_get_attributes(font->layout); ! if (font->IsUnderlined) { attr = pango_attr_underline_new(PANGO_UNDERLINE_SINGLE); --- 520,524 ---- attr_list = pango_layout_get_attributes(font->layout); ! if (font->style & FONT_UNDERLINED) { attr = pango_attr_underline_new(PANGO_UNDERLINE_SINGLE); *************** *** 529,533 **** } ! if (font->IsStriked) { attr = pango_attr_strikethrough_new(gtk_true()); --- 529,533 ---- } ! if (font->style & FONT_STRIKED) { attr = pango_attr_strikethrough_new(gtk_true()); Index: Font.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Font.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Font.c 3 Mar 2003 00:14:10 -0000 1.4 --- Font.c 24 Aug 2003 19:02:45 -0000 1.5 *************** *** 90,94 **** } ! FontHandle osCreateFont(char *face, int size, int weight, int style, BOOL IsUnderlined, BOOL IsStriked) { FontHandle font; --- 90,94 ---- } ! FontHandle osCreateFont(char *face, int size, int weight, int style) { FontHandle font; *************** *** 106,110 **** pango_font_description_set_family(font->font_descr,face); pango_font_description_set_weight(font->font_descr,weight); ! pango_font_description_set_style(font->font_descr,style); pango_font_description_set_size(font->font_descr, size*PANGO_SCALE); --- 106,110 ---- pango_font_description_set_family(font->font_descr,face); pango_font_description_set_weight(font->font_descr,weight); ! pango_font_description_set_style(font->font_descr,style & FONT_TYPE_MASK); pango_font_description_set_size(font->font_descr, size*PANGO_SCALE); *************** *** 118,125 **** font->metrics = pango_font_get_metrics(pango_font, pango_context_get_language(pango_context)); ! font->IsUnderlined = IsUnderlined; ! font->IsStriked = IsStriked; ! if (font->IsUnderlined || font->IsStriked) pango_layout_set_attributes(font->layout, pango_attr_list_new()); --- 118,124 ---- font->metrics = pango_font_get_metrics(pango_font, pango_context_get_language(pango_context)); ! font->style = style; ! if (font->style & (FONT_UNDERLINED | FONT_STRIKED)) pango_layout_set_attributes(font->layout, pango_attr_list_new()); *************** *** 201,212 **** { *face = "helvetica"; - *size = 12; - *weight = 500; - *style = 0; - } - - void osDialogFontDef(char **face, int *size, int *weight, int *style) - { - *face = "helvetica"; *size = 12; *weight = 500; --- 200,203 ---- |