swing - Java Custom Font Distortion -


I am writing an application that contains a .ttf file for GUI fonts. Loading a font is not a problem Is, however, when the deriveFont () method is being used to edit the font, it seems that the font can be distorted (such as not on the same line, by letters Vanishing parts, scubaing, ..).

Why is this? is there any way?

To load the code in the code:

  InputStream = getClass (). GetResourceAsStream ("/ fonts / lg.ttf"); Graphics Environment Ge = Graphics Environment. GateLocal Graphics Environment (); League gothic = font.createfont (font is TRUETYPE_FONT,); Ge.registerFont (leagueGothic);  

and then deriveFont ()

  label.setFont (league gothic.devfonts (font.plain, scale (50 , 'X'));  

Scale (int, four) There is only one way to change the proportional size of the application window, it is a Int .

deriveFont () , Method scale (int, char) "This returns a int ." This should probably return a float size < / Code> parameter is required.

< / Div>

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -