ZenHarbinger / l2fprod-properties-editor

Fork and Extension of l2fprod's Java properties editing component.
http://tros.org/l2fprod-properties-editor/
Apache License 2.0
2 stars 4 forks source link

Fonts - on Windows 10 I only have 5 typeface #3

Closed tonybeckett closed 8 years ago

tonybeckett commented 8 years ago

Java shows that there are many more available. Why the limitation?

tonybeckett commented 8 years ago

Windows 10

 public static void main(String[] args)
    {
        String fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();

        for (int i = 0; i < fonts.length; i++)
        {
            System.out.println(fonts[i]);
        }
    }
Arial
Arial Black
Arimo
Caladea
Calibri
Calibri Light
Cambria
Cambria Math
Candara
Carlito
Comic Sans MS
Consolas
Constantia
Corbel
Courier New
DejaVu Sans
DejaVu Sans Condensed
DejaVu Sans Light
DejaVu Sans Mono
DejaVu Serif
DejaVu Serif Condensed
Dialog
DialogInput
Ebrima
Franklin Gothic Medium
Gabriola
Gadugi
Gentium Basic
Gentium Book Basic
Georgia
HP Simplified
HP Simplified Light
Impact
Javanese Text
Leelawadee UI
Leelawadee UI Semilight
Liberation Mono
Liberation Sans
Liberation Sans Narrow
Liberation Serif
Linux Biolinum G
Linux Libertine Display G
Linux Libertine G
Lucida Bright
Lucida Console
Lucida Sans
Lucida Sans Typewriter
Lucida Sans Unicode
Malgun Gothic
Malgun Gothic Semilight
Marlett
Microsoft Himalaya
Microsoft JhengHei
Microsoft JhengHei Light
Microsoft JhengHei UI
Microsoft JhengHei UI Light
Microsoft New Tai Lue
Microsoft PhagsPa
Microsoft Sans Serif
Microsoft Tai Le
Microsoft YaHei
Microsoft YaHei Light
Microsoft YaHei UI
Microsoft YaHei UI Light
Microsoft Yi Baiti
MingLiU-ExtB
MingLiU_HKSCS-ExtB
Mongolian Baiti
Monospaced
MS Gothic
MS PGothic
MS UI Gothic
MV Boli
Myanmar Text
Nirmala UI
Nirmala UI Semilight
NSimSun
Open Sans
OpenSymbol
Palatino Linotype
PMingLiU-ExtB
PT Serif
SansSerif
Segoe MDL2 Assets
Segoe Print
Segoe Script
Segoe UI
Segoe UI Black
Segoe UI Emoji
Segoe UI Historic
Segoe UI Light
Segoe UI Semibold
Segoe UI Semilight
Segoe UI Symbol
Serif
SimSun
SimSun-ExtB
Sitka Banner
Sitka Display
Sitka Heading
Sitka Small
Sitka Subheading
Sitka Text
Source Code Pro
Source Sans Pro
Source Sans Pro Black
Source Sans Pro ExtraLight
Source Sans Pro Light
Source Sans Pro Semibold
SWGamekeys MT
Sylfaen
Symbol
Tahoma
Times New Roman
Trebuchet MS
Verdana
Webdings
Wingdings
Yu Gothic
Yu Gothic Light
Yu Gothic Medium
Yu Gothic UI
Yu Gothic UI Light
Yu Gothic UI Semibold
Yu Gothic UI Semilight
ZenHarbinger commented 8 years ago

Uh, ok.

ZenHarbinger commented 8 years ago

OK, I have branched off a 1.0.4 that has a FontPropertiesEditor.java file: https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/1.0.4/src/main/java/com/l2fprod/common/beans/editor/FontPropertyEditor.java

Works, except that when it updates the button live, the font size is set to 1.

ZenHarbinger commented 8 years ago

The default editor/render for Fonts was using a bean in the sun package that was buried pretty deeply. There was no way to fix this, so I just replaced it w/ a new Renderer and Editor class. I removed the 1.0.4 branch and have put updated sources directly into the master branch.