2362N/A * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A#
endif /* !HEADLESS */ 0N/A/* #define FONT_DEBUG 2 */ 0N/A/* 1- print failures, 2- print all, 3- terminate on failure */ 0N/A#
endif /* !HEADLESS */ 0N/A * Class: java_awt_Font 0N/A/* This function gets called from the static initializer for Font.java 0N/A to initialize the fieldIDs for fields that may be accessed from C */ 0N/A /** We call "NoClientCode" methods because they won't invoke client 0N/A code on the privileged toolkit thread **/ 0N/A#
endif /* !HEADLESS */ 0N/A/* fieldIDs for X11FontMetrics fields that may be accessed from C */ 0N/A * Class: sun_awt_motif_X11FontMetrics 0N/A/* This function gets called from the static initializer for 0N/A that may be accessed from C */ 0N/A/* fieldIDs for FontDescriptor fields that may be accessed from C */ 0N/A#
endif /* !HEADLESS */ 0N/A * Class: sun_awt_FontDescriptor 0N/A/* This function gets called from the static initializer for 0N/A that may be accessed from C */ 0N/A#
endif /* !HEADLESS */ 0N/A * Class: sun_awt_motif_MFontPeer 0N/A/* This function gets called from the static initializer for 0N/A that may be accessed from C */ 0N/A#
endif /* !HEADLESS */ 0N/A * Class: sun_awt_PlatformFont 0N/A/* This function gets called from the static initializer for 0N/A that may be accessed from C */ 0N/A#
endif /* !HEADLESS */ 0N/A /* try the exact xlfd name in font configuration file */ 0N/A * 1. specify FAMILY_NAME, WEIGHT_NAME, SLANT, POINT_SIZE, 0N/A * CHARSET_REGISTRY and CHARSET_ENCODING. 0N/A * 2. change POINT_SIZE to PIXEL_SIZE 0N/A * 3. change FAMILY_NAME to * 0N/A * 5. change PIXEL_SIZE +1/-1/+2/-2...+4/-4 0N/A * 6. default font pattern 0N/A * This code assumes the name contains exactly 14 '-' delimiter. 0N/A * If not use default pattern. 0N/A /* set FAMILY_NAME */ 0N/A /* set STYLE_NAME */ 0N/A /* skip SETWIDTH_NAME, ADD_STYLE_NAME, PIXEL_SIZE 0N/A POINT_SIZE, RESOLUTION_X, RESOLUTION_Y, SPACING 0N/A and AVERAGE_WIDTH */ 0N/A /* set CHARSET_REGISTRY and CHARSET_ENCODING */ 0N/A /* Regular is the style for TrueType fonts -- Type1, F3 use roman */ 0N/A "-*-%s-%s-%s-*-*-*-%d-*-*-*-*-%s",
0N/A "-*-%s-%s-%s-*-*-*-%d-*-*-*-*-%s",
0N/A /* search bitmap font */ 0N/A "-*-%s-%s-%s-*-*-%d-*-*-*-*-*-%s",
0N/A "-*-%s-%s-%s-*-*-%d-*-*-*-*-*-%s",
0N/A "-*-*-%s-%s-*-*-%d-*-*-*-*-*-%s",
0N/A "-*-*-%s-%s-*-*-%d-*-*-*-*-*-%s",
0N/A "-*-*-*-%s-*-*-%d-*-*-*-*-*-%s",
0N/A "-*-*-*-*-*-*-%d-*-*-*-*-*-%s",
0N/A for (i =
1; i <
4; i++) {
0N/A "-*-%s-%s-%s-*-*-%d-*-*-*-*-*-%s",
0N/A "-*-%s-%s-%s-*-*-%d-*-*-*-*-*-%s",
0N/A "-*-*-*-*-*-*-%d-*-*-*-*-*-%s",
0N/A "-*-*-*-*-*-*-%d-*-*-*-*-*-%s",
0N/A * Hardwired list of mappings for generic font names "Helvetica", 0N/A * "TimesRoman", "Courier", "Dialog", and "DialogInput". 0N/A /* additional default font names */ 0N/A /* We are going to create at most 4 outstanding local refs in this 0N/A /* We no longer need peer */ 0N/A /* We are done with the objects. */ 0N/A * set load & XFontStruct 0N/A * This appears to be a bogus check. The actual intent appears 0N/A * to be to find out whether this is the "base" font in a set, 0N/A * rather than iso8859_1 explicitly. Note that iso8859_15 will 0N/A * and must also pass this test. 0N/A /*fprintf(stderr,"LoadFont: %s\n", fontSpec); */ 0N/A /* XXX: sometimes XLoadQueryFont returns a bogus font structure */ 0N/A /* with negative ascent. */ 0N/A /* Try any other foundry before messing with the sizes */ 0N/A /* We couldn't find the font. We'll try to find an */ 0N/A /* alternate by searching for heights above and below our */ 0N/A /* preferred height. We try for 4 heights above and below. */ 0N/A /* If we still can't find a font we repeat the algorithm */ 0N/A /* using misc-fixed as the font. If we then fail, then we */ 0N/A /* give up and signal an error. */ 0N/A * Class: sun_awt_motif_X11FontMetrics 0N/A * Method: getMFCharsWidth 0N/A * Class: sun_awt_motif_X11FontMetrics 0N/A * Method: bytesWidth 0N/A * Signature: ([BII)I 0N/A * Class: sun_awt_motif_X11FontMetrics 0N/A * Bug 4103248, 4120310. We must take all of the fonts into 0N/A * consideration in providing the metrics, not just the 8859-1 font, 0N/A * because the underlying Motif widgets are. 0N/A * We could pin the array and then release it, but I believe this method 0N/A * is faster and perturbs the VM less 0N/A * Registered with the 2D disposer to be called after the Font is GC'd. 0N/A /* AWT fonts are always "multifonts" and probably have been in 0N/A * all post 1.0 releases, so this test test for multi fonts is 0N/A * probably not needed, and the singleton xfont is probably never used. 0N/A /* Don't free fdata->xfont because it is equal to fdata->flist[i].xfont 0N/A#
endif /* !HEADLESS */