< prev index next >

modules/graphics/src/test/java/test/com/sun/javafx/pgstub/StubFontLoader.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2011, 2015, 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) 2011, 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
*** 27,36 **** --- 27,37 ---- import com.sun.javafx.font.FontResource; import com.sun.javafx.font.FontStrike; import com.sun.javafx.font.PGFont; import com.sun.javafx.geom.transform.BaseTransform; + import com.sun.javafx.text.FontHelper; import com.sun.javafx.tk.FontLoader; import com.sun.javafx.tk.FontMetrics; import javafx.scene.text.Font; import javafx.scene.text.FontPosture; import javafx.scene.text.FontWeight;
*** 46,83 **** public void loadFont(Font font) { StubFont nativeFont = new StubFont(); nativeFont.font = font; String name = font.getName().trim().toLowerCase(Locale.ROOT); if (name.equals("system") || name.equals("system regular")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "System", "Regular"); } else if (name.equals("amble regular")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble", "Regular"); } else if (name.equals("amble bold")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble", "Bold"); } else if (name.equals("amble italic")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble", "Italic"); } else if (name.equals("amble bold italic")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble", "Bold Italic"); } else if (name.equals("amble condensed")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble Cn", "Regular"); } else if (name.equals("amble bold condensed")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble Cn", "Bold"); } else if (name.equals("amble condensed italic")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble Cn", "Italic"); } else if (name.equals("amble bold condensed italic")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble Cn", "Bold Italic"); } else if (name.equals("amble light")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble Lt", "Regular"); } else if (name.equals("amble light italic")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble Lt", "Italic"); } else if (name.equals("amble light condensed")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble LtCn", "Regular"); } else if (name.equals("amble light condensed italic")) { ! font.impl_setNativeFont(nativeFont, font.getName(), "Amble LtCn", "Italic"); } } @Override --- 47,84 ---- public void loadFont(Font font) { StubFont nativeFont = new StubFont(); nativeFont.font = font; String name = font.getName().trim().toLowerCase(Locale.ROOT); if (name.equals("system") || name.equals("system regular")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "System", "Regular"); } else if (name.equals("amble regular")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble", "Regular"); } else if (name.equals("amble bold")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble", "Bold"); } else if (name.equals("amble italic")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble", "Italic"); } else if (name.equals("amble bold italic")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble", "Bold Italic"); } else if (name.equals("amble condensed")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Cn", "Regular"); } else if (name.equals("amble bold condensed")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Cn", "Bold"); } else if (name.equals("amble condensed italic")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Cn", "Italic"); } else if (name.equals("amble bold condensed italic")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Cn", "Bold Italic"); } else if (name.equals("amble light")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Lt", "Regular"); } else if (name.equals("amble light italic")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble Lt", "Italic"); } else if (name.equals("amble light condensed")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble LtCn", "Regular"); } else if (name.equals("amble light condensed italic")) { ! FontHelper.setNativeFont(font, nativeFont, font.getName(), "Amble LtCn", "Italic"); } } @Override
< prev index next >