Created
August 20, 2013 19:45
-
-
Save matiasinsaurralde/6286254 to your computer and use it in GitHub Desktop.
@font-face generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir[ File.join( ARGV[0], '*' ) ].each do |font| | |
puts "@font-face { font-family: #{font.split('/').last.split('.').first}; src: url('#{font}'); }" | |
end | |
# $ ruby font-face-generator.rb fonts/ | |
# @font-face { font-family: Example; src: url('fonts/Example.otf'); } | |
# @font-face { font-family: AnotherOne; src: url('fonts/AnotherOne.otf'); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment