Permalink
Browse files

Generate font textures with even width and height

  • Loading branch information...
1 parent e45cbbd commit 21ea42629d844394a98b82b30f1b833b05360104 @hagabaka hagabaka committed Dec 18, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 Rakefile
View
3 Rakefile
@@ -199,6 +199,9 @@ LANGUAGES.each_pair do |language, font|
montage -label '' -background transparent -gravity SouthWest \
-geometry '1x1+0+0<' #{glyphs.keys.join(' ')} png32:#{font_texture}
COMMAND
+ # For iOS optimization, the textures need to have even width and height
+ (width, height) = image_size(font_texture).map {|length| length + length % 2}
+ sh "convert #{font_texture} -gravity NorthWest -background transparent -extent #{width}x#{height} png32:#{font_texture}"
end
font_cfg_snippet = font_cfg_snippet(style, language)

0 comments on commit 21ea426

Please sign in to comment.