shoes / shoes3

a tiny graphical app kit for ruby
http://walkabout.mvmanila.com
Other
181 stars 19 forks source link

OSX font loading #218

Open ccoupe opened 8 years ago

ccoupe commented 8 years ago

As mentioned in #216, The Shoes font command only partially works as documented.

Shoes.app do
  stack do
    all_fonts = Shoes::FONTS
    para "#{all_fonts.length} fonts [0]: #{all_fonts[0]} [-1]: #{all_fonts[-1]}"
    para "Lacuna? #{all_fonts.include? 'Lacuna Regular'}"
    lac = font "#{DIR}/fonts/Lacuna.ttf"
    para "Loaded: #{lac.inspect}"
    new_fonts = Shoes::FONTS
    para "#{new_fonts.length} fonts [0]: #{new_fonts[0]} [-1]: #{new_fonts[-1]}"
    para "Lacuna? #{new_fonts.include? 'Lacuna Regular'}" 
  end
end

Linux: linux-fonts

OSX: osx-fonts

For most people it appears to work. The font is loaded, and it does show in the fonts list, but it does not return what the manual says - an array of names.