src/java.desktop/unix/native/common/awt/awt_Font.c
changeset 51853 ec62d6cab037
parent 47216 71c04702a3d5
child 57515 2db64810f4fc
child 58678 9cf78a70fa4f
equal deleted inserted replaced
51852:e240625311ad 51853:ec62d6cab037
   636             /*fprintf(stderr,"LoadFont: %s\n", fontSpec); */
   636             /*fprintf(stderr,"LoadFont: %s\n", fontSpec); */
   637             xfont = XLoadQueryFont(display, fontSpec);
   637             xfont = XLoadQueryFont(display, fontSpec);
   638 
   638 
   639             /* XXX: sometimes XLoadQueryFont returns a bogus font structure */
   639             /* XXX: sometimes XLoadQueryFont returns a bogus font structure */
   640             /* with negative ascent. */
   640             /* with negative ascent. */
   641             if (xfont == (Font) NULL || xfont->ascent < 0) {
   641             if (xfont == NULL || xfont->ascent < 0) {
   642                 if (xfont != NULL) {
   642                 if (xfont != NULL) {
   643                     XFreeFont(display, xfont);
   643                     XFreeFont(display, xfont);
   644                 }
   644                 }
   645                 if (foundry != anyfoundry) {  /* Use ptr comparison here, not strcmp */
   645                 if (foundry != anyfoundry) {  /* Use ptr comparison here, not strcmp */
   646                     /* Try any other foundry before messing with the sizes */
   646                     /* Try any other foundry before messing with the sizes */