mirror of
https://gitlab.com/degruyter-public/font/de-gruyter-sans_serif.git
synced 2026-09-20 05:40:46 +09:00
Initial code commit
* inserted scripts * changed README
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
require "#{File.dirname(File.expand_path(__FILE__))}/extract_info_lib.rb"
|
||||
require 'yaml'
|
||||
|
||||
base_font_directory = ARGV[0]
|
||||
search_font_directory = ARGV[1]
|
||||
|
||||
base_font_infos = {}
|
||||
|
||||
|
||||
|
||||
(Dir.glob("#{base_font_directory}/*.[ot]tf") + Dir.glob("#{base_font_directory}/**/*.[ot]tf")).each{|font_file|
|
||||
_infos = extract_infos_for_font(font_file)
|
||||
base_font_infos[_infos['Family']] = {} unless base_font_infos[_infos['Family']]
|
||||
base_font_infos[_infos.delete('Family')][_infos.delete('Subfamily')] = _infos
|
||||
}
|
||||
|
||||
puts base_font_infos.to_yaml
|
||||
Reference in New Issue
Block a user