I just wanted to build the project but the following junit test fails:
"testStyleSettingByValue" in FontTest.java. The Problem seems to be when the Font is created via the FontFactory (line 47) the second iteration (style=1) fails.
I debugged into the FontFactoryImp.java and in the getFont() method there is a retrieval of the font families: [Tahoma, Tahoma, Tahoma Bold, Tahoma Bold]. (line 177).
Now style=1 means bold and since there is a "Tahoma Bold" font the style is reset to 0 (lines 183-188):
// If a styled font already exists, we don't want to use the separate style-Attribut.
// For example: Helvetica-Bold should have a normal style, because it's already bold.
style = s == fs ? Font.NORMAL : s;
Now I have too little understanding of that area: It makes sense not to unset the bold-style since there is a tahoma-bold font available. So it could be that just the junit is not correct, which would also indicate the variable name "FONT_NAME_WITHOUT_STYLES". Because it actually does have a style
Pull request welcome!
I wrote the test. Didn't know Tahoma has a bold font too. I'll fix it. Do you know a font which has no bold or Italic styled font?
Most helpful comment
I wrote the test. Didn't know Tahoma has a bold font too. I'll fix it. Do you know a font which has no bold or Italic styled font?