< prev index next >

src/java.desktop/unix/native/common/awt/awt_Font.c

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 636,646 **** /*fprintf(stderr,"LoadFont: %s\n", fontSpec); */ xfont = XLoadQueryFont(display, fontSpec); /* XXX: sometimes XLoadQueryFont returns a bogus font structure */ /* with negative ascent. */ ! if (xfont == (Font) NULL || xfont->ascent < 0) { if (xfont != NULL) { XFreeFont(display, xfont); } if (foundry != anyfoundry) { /* Use ptr comparison here, not strcmp */ /* Try any other foundry before messing with the sizes */ --- 636,646 ---- /*fprintf(stderr,"LoadFont: %s\n", fontSpec); */ xfont = XLoadQueryFont(display, fontSpec); /* XXX: sometimes XLoadQueryFont returns a bogus font structure */ /* with negative ascent. */ ! if (xfont == NULL || xfont->ascent < 0) { if (xfont != NULL) { XFreeFont(display, xfont); } if (foundry != anyfoundry) { /* Use ptr comparison here, not strcmp */ /* Try any other foundry before messing with the sizes */
*** 707,717 **** struct FontData *fdata = NULL; int32_t i = 0; Display *display = XDISPLAY; AWT_LOCK(); ! fdata = (struct FontData *)pData; if (fdata == NULL) { AWT_UNLOCK(); return; } --- 707,717 ---- struct FontData *fdata = NULL; int32_t i = 0; Display *display = XDISPLAY; AWT_LOCK(); ! fdata = (struct FontData *) jlong_to_ptr(pData); if (fdata == NULL) { AWT_UNLOCK(); return; }
< prev index next >