forked from cosmix/Inconsolata-Hellenic
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
99 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.INTERMEDIATE: Inconsolata-LGC-Polish.sfd Inconsolata-LGC-Bulgarian.sfd Inconsolata-LGC-Yugoslav.sfd | ||
Inconsolata-LGC-Polish.sfd: Inconsolata-LGC.sfd regional.rb | ||
./regional.rb pl < $< > $@ | ||
Inconsolata-LGC-Bulgarian.sfd: Inconsolata-LGC.sfd regional.rb | ||
./regional.rb bg < $< > $@ | ||
Inconsolata-LGC-Yugoslav.sfd: Inconsolata-LGC.sfd regional.rb | ||
./regional.rb mkd < $< > $@ | ||
|
||
Inconsolata-LGC.ttc: Inconsolata-LGC.sfd Inconsolata-LGC-Polish.sfd Inconsolata-LGC-Bulgarian.sfd Inconsolata-LGC-Yugoslav.sfd makettc.py | ||
./makettc.py $@ Inconsolata-LGC.sfd Inconsolata-LGC-Polish.sfd Inconsolata-LGC-Bulgarian.sfd Inconsolata-LGC-Yugoslav.sfd |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env fontforge -script | ||
from sys import argv | ||
font = fontforge.open(argv[2]) | ||
fonts = [fontforge.open(filename) for filename in argv[3:len(argv)]] | ||
font.generateTtc(argv[1], fonts) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env ruby | ||
|
||
c = {} | ||
g = "" | ||
f = $stdin.readlines | ||
|
||
t = { | ||
"bg" => {tag: /\.bg$/, namesuffix: "Bulgarian"}, | ||
"mkd" => {tag: /\.mkd$/, namesuffix: "Yugoslav"}, | ||
"pl" => {tag: /\.pl$/, namesuffix: "Polish"} | ||
} | ||
|
||
f.each {|l| | ||
l.chomp! | ||
if l =~ /^StartChar:/ then | ||
g = l.sub(/^StartChar:\s*(.*)$/, '\1') | ||
elsif l =~ /^Encoding:/ and g != "" then | ||
c.merge!({g => l.sub(/^Encoding:\s*(\d+)\s+(-?\d+).*$/, '\2')}) | ||
end | ||
} | ||
|
||
c.each {|k, v| | ||
if k =~ t[$*[0]][:tag] then | ||
w = c[k.sub(t[$*[0]][:tag], "")] | ||
c[k.sub(t[$*[0]][:tag], "")] = v | ||
c[k] = w | ||
end | ||
} | ||
|
||
g = "" | ||
f.each {|l| | ||
if l =~ /^(Font|Full|Family)Name:/ then | ||
l.sub!(/Inconsolata( ?)LGC/, '\&\1' + t[$*[0]][:namesuffix]) | ||
elsif l =~ /^StartChar:/ then | ||
g = l.sub(/^StartChar:\s*(.*)$/, '\1') | ||
elsif l =~ /^Encoding:/ and g != "" then | ||
l.sub!(/^Encoding:\s*(\d+)\s*(-?\d+)/, 'Encoding: \1 ' + c[g]) | ||
end | ||
begin | ||
puts l | ||
rescue Errno::EPIPE | ||
end | ||
} |