< prev index next >

src/java.desktop/unix/classes/sun/font/FontConfigManager.java

Print this page




 419          * together to prevent synthetic styling.
 420          */
 421         for (int i=0; i<fontConfigFonts.length; i++) {
 422             FcCompFont fc = fontConfigFonts[i];
 423             if (fc != fcInfo &&
 424                 physFont.getFamilyName(null).equals(fc.firstFont.familyName) &&
 425                 !fc.firstFont.fontFile.equals(physFont.platName) &&
 426                 family.getFontWithExactStyleMatch(fc.style) == null) {
 427 
 428                 registerFromFcInfo(fontConfigFonts[i]);
 429             }
 430         }
 431 
 432         /* Now we have a physical font. We will back this up with the JDK
 433          * logical font (sansserif, serif, or monospaced) that corresponds
 434          * to the Pango/GTK/FC logical font name.
 435          */
 436         return (fcInfo.compFont = new CompositeFont(physFont, jdkFont));
 437     }
 438 
 439     /**
 440      *
 441      * @param locale
 442      * @param fcFamily
 443      * @return
 444      */
 445     public FcCompFont[] getFontConfigFonts() {
 446         return fontConfigFonts;
 447     }
 448 
 449     /* Return an array of FcCompFont structs describing the primary
 450      * font located for each of fontconfig/GTK/Pango's logical font names.
 451      */
 452     private static native void getFontConfig(String locale,
 453                                              FontConfigInfo fcInfo,
 454                                              FcCompFont[] fonts,
 455                                              boolean includeFallbacks);
 456 
 457     void populateFontConfig(FcCompFont[] fcInfo) {
 458         fontConfigFonts = fcInfo;
 459     }
 460 
 461     FcCompFont[] loadFontConfig() {
 462         initFontConfigFonts(true);
 463         return fontConfigFonts;
 464     }


 419          * together to prevent synthetic styling.
 420          */
 421         for (int i=0; i<fontConfigFonts.length; i++) {
 422             FcCompFont fc = fontConfigFonts[i];
 423             if (fc != fcInfo &&
 424                 physFont.getFamilyName(null).equals(fc.firstFont.familyName) &&
 425                 !fc.firstFont.fontFile.equals(physFont.platName) &&
 426                 family.getFontWithExactStyleMatch(fc.style) == null) {
 427 
 428                 registerFromFcInfo(fontConfigFonts[i]);
 429             }
 430         }
 431 
 432         /* Now we have a physical font. We will back this up with the JDK
 433          * logical font (sansserif, serif, or monospaced) that corresponds
 434          * to the Pango/GTK/FC logical font name.
 435          */
 436         return (fcInfo.compFont = new CompositeFont(physFont, jdkFont));
 437     }
 438 






 439     public FcCompFont[] getFontConfigFonts() {
 440         return fontConfigFonts;
 441     }
 442 
 443     /* Return an array of FcCompFont structs describing the primary
 444      * font located for each of fontconfig/GTK/Pango's logical font names.
 445      */
 446     private static native void getFontConfig(String locale,
 447                                              FontConfigInfo fcInfo,
 448                                              FcCompFont[] fonts,
 449                                              boolean includeFallbacks);
 450 
 451     void populateFontConfig(FcCompFont[] fcInfo) {
 452         fontConfigFonts = fcInfo;
 453     }
 454 
 455     FcCompFont[] loadFontConfig() {
 456         initFontConfigFonts(true);
 457         return fontConfigFonts;
 458     }
< prev index next >