-
Bug
-
Resolution: Duplicate
-
P4
-
7u6
-
JavaFX 2.2 b15
I'm trying to build a list of available font families in order to implement a Font picker. I discovered that you get different results depending on which API call you use.
For instance, if you do 1.:
Font f = Font.getDefault();
double defSize = f.getSize();
Set<Font> allFonts = new TreeSet<Font>(Fonts.fontComparator);
for (String familly : Font.getFamilies()) {
for (String name : Font.getFontNames(familly)) {
Font font = new Font(name, defSize);
allFonts.add(font);
}
}
then extract a set of families from the list of fonts in allFonts, you don't get the same result as if you do 2.:
for (String name : Font.getFontNames()) {
Font font = new Font(name, defSize);
allFonts.add(font);
}
then extract a set of families from the list of fonts in allFonts.
On my windows machine, if I use 1. then my list of families does not contain "Lucida Sans", but if I use 2. it does.
Shouldn't both sets be the same in the end? Why aren't they?
For instance, if you do 1.:
Font f = Font.getDefault();
double defSize = f.getSize();
Set<Font> allFonts = new TreeSet<Font>(Fonts.fontComparator);
for (String familly : Font.getFamilies()) {
for (String name : Font.getFontNames(familly)) {
Font font = new Font(name, defSize);
allFonts.add(font);
}
}
then extract a set of families from the list of fonts in allFonts, you don't get the same result as if you do 2.:
for (String name : Font.getFontNames()) {
Font font = new Font(name, defSize);
allFonts.add(font);
}
then extract a set of families from the list of fonts in allFonts.
On my windows machine, if I use 1. then my list of families does not contain "Lucida Sans", but if I use 2. it does.
Shouldn't both sets be the same in the end? Why aren't they?
- duplicates
-
JDK-8119405 ignored NPE loading jre font into font factory tables
-
- Resolved
-
- relates to
-
JDK-8116431 Font Chooser issue
-
- Closed
-