Archiv für April 2011

Creating custom Font in Java

Mittwoch, 6. April 2011

Creating a custom font from a TrueTypeFont file in Java is not that hard. However there are some pitfalls:

  • The font size in in pt (Points) where a point is 1/72 of an inch, that is for a normal person about 3.5mm.
  • The created Font has an initial size of 1pt
  • The font size is passed as Float but rounded to the nearest Integer
  • Passing an Integer for the font size does not work (results in unchanged font size)
public Font createDefaultFont(int size)throws FontFormatException, IOException{
	Font font = Font.createFont( Font.TRUETYPE_FONT, getClass().getResourceAsStream( "/"+defaultFont) );
        return font.deriveFont((float)size);
}

Here defaultFont is the filename of the TrueType Font.

Modelling 3D feather with blender

Samstag, 2. April 2011

Browsing through the links found by google on the issue blender and feathers did not provide me with what I searched. For completeness sake let me list them here in the case it is what you are looking for:

Forum entries and other listings:

Ready made feather models:

Tutorials:

(weiterlesen …)