Update to 6.3.0, Aliases and Sharp Regular Pro fonts

- Aliases are now included in the icon list names
- Support for font style "Font Awesome Sharp Regular" (Pro)
- Update generator to include all alias names
- Update free font files to latest release
This commit is contained in:
Rick Blommers
2023-02-09 11:53:16 +01:00
parent a6051c8870
commit b304ec196e
13 changed files with 2253 additions and 18 deletions

View File

@@ -42,17 +42,37 @@ class Icons
def build_maps(icons)
icons.each do |key, data|
if data['free'].length > 0
if data['free'].first == 'brands'
@icons_brands[key] = data['unicode']
else
@icons_regular_free[key] = data['unicode'] if data['free'].include?('regular')
@icons_common[key] = data['unicode']
end
build_map_free(key, data)
else
build_map_pro(key, data)
end
end
end
if data['free'].length == 0
@icons_pro[key] = data['unicode']
def build_map_free(key, data)
if data['free'].first == 'brands'
@icons_brands[key] = data['unicode']
add_aliasses(@icons_brands, data)
else
if data['free'].include?('regular')
@icons_regular_free[key] = data['unicode']
add_aliasses(@icons_regular_free, data)
end
@icons_common[key] = data['unicode']
add_aliasses(@icons_common, data)
end
end
def build_map_pro(key, data)
@icons_pro[key] = data['unicode']
add_aliasses(@icons_pro, data)
end
def add_aliasses(hash, data)
data.dig('aliases', 'names')&.each do |alias_key|
raise "Duplicatie key found for alias!" if hash.key?(alias_key)
hash[alias_key] = data['unicode']
end
end