/[classpath]/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c
ViewVC logotype

Diff of /classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by egagnon, Mon Mar 29 07:07:26 2004 UTC revision 1.6 by mark, Sat Aug 14 17:19:50 2004 UTC
# Line 54  JNIEXPORT jintArray JNICALL Java_gnu_jav Line 54  JNIEXPORT jintArray JNICALL Java_gnu_jav
54    jint *metrics;    jint *metrics;
55    struct peerfont *pf = NULL;    struct peerfont *pf = NULL;
56    FT_Matrix mat;    FT_Matrix mat;
57      double pointsize;
58      FT_Face face;
59    
60    pf = NSA_GET_FONT_PTR(env, font);    pf = NSA_GET_FONT_PTR(env, font);
61    g_assert (pf != NULL);    g_assert (pf != NULL);
# Line 68  JNIEXPORT jintArray JNICALL Java_gnu_jav Line 70  JNIEXPORT jintArray JNICALL Java_gnu_jav
70  #define DOUBLE_TO_16_16(d) ((FT_Fixed)((d) * 65536.0))  #define DOUBLE_TO_16_16(d) ((FT_Fixed)((d) * 65536.0))
71  #define DOUBLE_FROM_16_16(t) ((double)(t) / 65536.0)  #define DOUBLE_FROM_16_16(t) ((double)(t) / 65536.0)
72    
73    double pointsize = pango_font_description_get_size (pf->desc);    pointsize = pango_font_description_get_size (pf->desc);
74    pointsize /= (double) PANGO_SCALE;    pointsize /= (double) PANGO_SCALE;
75    
76    mat.xx = DOUBLE_TO_16_16(1);    mat.xx = DOUBLE_TO_16_16(1);
# Line 76  JNIEXPORT jintArray JNICALL Java_gnu_jav Line 78  JNIEXPORT jintArray JNICALL Java_gnu_jav
78    mat.yx = DOUBLE_TO_16_16(0);    mat.yx = DOUBLE_TO_16_16(0);
79    mat.yy = DOUBLE_TO_16_16(1);      mat.yy = DOUBLE_TO_16_16(1);  
80        
81    FT_Face face = pango_ft2_font_get_face (pf->font);      face = pango_ft2_font_get_face (pf->font);  
82    FT_Set_Transform(face, &mat, NULL);    FT_Set_Transform(face, &mat, NULL);
83    FT_Set_Char_Size( face,    FT_Set_Char_Size( face,
84                      DOUBLE_TO_26_6 (pointsize),                      DOUBLE_TO_26_6 (pointsize),

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26