mirror of
https://github.com/i-tu/Hasklig.git
synced 2024-09-11 02:25:46 +03:00
Implement code ligatures :)
ligatures for: <-, ->, =>, >>, <<, >>=, =<<, .., …, ::, -<, >-, -<<, >>-, ++, /= and ==
This commit is contained in:
parent
94e8f996c0
commit
288ac111a0
4
.gitignore
vendored
4
.gitignore
vendored
@ -13,3 +13,7 @@ Roman/Regular/SourceCodePro-Regular.otf
|
||||
Roman/Regular/SourceCodePro-Regular.ttf
|
||||
Roman/Semibold/SourceCodePro-Semibold.otf
|
||||
Roman/Semibold/SourceCodePro-Semibold.ttf
|
||||
|
||||
*.vfbak
|
||||
|
||||
*.tmp
|
||||
|
@ -1 +1 @@
|
||||
# [PostScriptName]
# f=FamilyName
# s=StyleName
# l=Windows_Compatible_MenuName
# m=1,Macintosh_Compatible_MenuName
[SourceCodePro-ExtraLight]
f=Source Code Pro
s=ExtraLight
l=Source Code Pro ExtraLight
m=1,Source Code Pro ExtraLight
[SourceCodePro-Light]
f=Source Code Pro
s=Light
l=Source Code Pro Light
m=1,Source Code Pro Light
[SourceCodePro-Regular]
f=Source Code Pro
s=Regular
-ExtraLight]
s=ExtraLight
-ExtraLight]
l=Source Code Pro ExtraLight
-ExtraLight]
m=1,Source Code Pro ExtraLight
f=Source Code Pro
s=Medium
l=Source Code Pro Medium
m=1,Source Code Pro Medium
[SourceCodePro-Semibold]
f=Source Code Pro
s=Semibold
l=Source Code Pro Semibold
m=1,Source Code Pro Semibold
[SourceCodePro-Bold]
f=Source Code Pro
s=Bold
-ExtraLight]
s=ExtraLight
m=1,Source Code Pro Bold
[SourceCodePro-Black]
f=Source Code Pro
s=Black
l=Source Code Pro Black
m=1,Source Code Pro Black
|
||||
# [PostScriptName]
# f=FamilyName
# s=StyleName
# l=Windows_Compatible_MenuName
# m=1,Macintosh_Compatible_MenuName
[SourceCodePro s=ExtraLight
-ExtraLight]
s=ExtraLight
f=Source Code Pro
s=ExtraLight
l=Source Code Pro L ExtraLight
m=1,Source Code Pro L ExtraLight
[SourceCodeProL-Light]
s=ExtraLight
f=Source Code Pro
s=Light
l=Source Code Pro L Light
m=1,Source Code Pro L Light
[SourceCodeProL-Regular]
s=ExtraLight
f=Source Code Pro
s=Regular
s=ExtraLight
l=Source Code Pro Light
l=Source Code Pro ExtraLight
l=Source Code Pro ExtraLight
-ExtraLight]
s=ExtraLight
f=Source Code Pro
s=Medium
l=Source Code Pro L Medium
m=1,Source Code Pro L Medium
[SourceCodeProL-Semibold]
s=ExtraLight
f=Source Code Pro
s=Semibold
l=Source Code Pro L Semibold
m=1,Source Code Pro L Semibold
[SourceCodeProL-Bold]
s=ExtraLight
f=Source Code Pro
s=Bold
s=ExtraLight
l=Source Code Pro Light
m=1,Source Code Pro L Bold
[SourceCodeProL-Black]
s=ExtraLight
f=Source Code Pro
s=Black
l=Source Code Pro L Black
m=1,Source Code Pro L Black
|
||||
|
@ -961,3 +961,20 @@ uni259C upleftuprightdnrightquadrant
|
||||
uni259D uprightquadrant
|
||||
uni259E uprightdnleftquadrant
|
||||
uni259F uprightdnleftdnrightquadrant
|
||||
hyphen_greater hyphen_greater
|
||||
less_hyphen less_hyphen
|
||||
equal_greater equal_greater
|
||||
hyphen_less hyphen_less
|
||||
hyphen_less_less hyphen_less_less
|
||||
less_less less_less
|
||||
greater_greater greater_greater
|
||||
greater_greater_equal greater_greater_equal
|
||||
period_period period_period
|
||||
equal_less_less equal_less_less
|
||||
plus_plus plus_plus
|
||||
slash_equal slash_equal
|
||||
greater_greater_hyphen greater_greater_hyphen
|
||||
greater_hyphen greater_hyphen
|
||||
equal_equal equal_equal
|
||||
colon_colon colon_colon
|
||||
period_period_period period_period_period
|
||||
|
8947
Roman/Black/font.pfa
8947
Roman/Black/font.pfa
File diff suppressed because it is too large
Load Diff
Binary file not shown.
9032
Roman/Bold/font.pfa
9032
Roman/Bold/font.pfa
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
8147
Roman/Light/font.pfa
8147
Roman/Light/font.pfa
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
Roman/Regular/font.mmm
Normal file
BIN
Roman/Regular/font.mmm
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
RomanMM/SourceCodeProMM.mmm
Normal file
BIN
RomanMM/SourceCodeProMM.mmm
Normal file
Binary file not shown.
1
RomanMM/SourceCodeProMM.pfa
Normal file
1
RomanMM/SourceCodeProMM.pfa
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
3
RomanMM/current.fpr
Normal file
3
RomanMM/current.fpr
Normal file
@ -0,0 +1,3 @@
|
||||
InputFontPath ./mmfont.pfa
|
||||
FontMenuDBPath ../FontMenuNameDB
|
||||
OutputFontPath ./SourceCodePro_368_.otf
|
@ -1,8 +1,8 @@
|
||||
#KEYS:FamilyName FontName FullName Weight Coords IsBold
|
||||
Source Code Pro SourceCodePro-ExtraLight Source Code Pro ExtraLight ExtraLight (0) 0
|
||||
Source Code Pro SourceCodePro-Light Source Code Pro Light Light (100) 0
|
||||
Source Code Pro SourceCodePro-Regular Source Code Pro Regular (368) 0
|
||||
Source Code Pro SourceCodePro-Medium Source Code Pro Medium Medium (486) 0
|
||||
Source Code Pro SourceCodePro-Semibold Source Code Pro Semibold Semibold (600) 0
|
||||
Source Code Pro SourceCodePro-Bold Source Code Pro Bold Bold (824) 0
|
||||
Source Code Pro SourceCodePro-Black Source Code Pro Black Black (1000) 0
|
||||
Source Code Pro L SourceCodeProL-ExtraLight Source Code Pro L ExtraLight ExtraLight (0) 0
|
||||
Source Code Pro L SourceCodeProL-Light Source Code Pro L Light Light (100) 0
|
||||
Source Code Pro L SourceCodeProL-Regular Source Code L Pro Regular (368) 0
|
||||
Source Code Pro L SourceCodeProL-Medium Source Code Pro L Medium Medium (486) 0
|
||||
Source Code Pro L SourceCodeProL-Semibold Source Code L Pro Semibold Semibold (600) 0
|
||||
Source Code Pro L SourceCodeProL-Bold Source Code Pro L Bold Bold (824) 0
|
||||
Source Code Pro L SourceCodeProL-Black Source Code Pro L Black Black (1000) 0
|
||||
|
1003
RomanMM/mmfont.afm
Normal file
1003
RomanMM/mmfont.afm
Normal file
File diff suppressed because it is too large
Load Diff
23
RomanMM/mmfont.inf
Normal file
23
RomanMM/mmfont.inf
Normal file
@ -0,0 +1,23 @@
|
||||
FontName (SourceCodeProL_368_wt)
|
||||
FullName (Source Code Pro L)
|
||||
AppleName (SourceCodeProL_368_wt)
|
||||
FamilyName (Source Code Pro L)
|
||||
Version (1.000)
|
||||
isFixedPitch true
|
||||
CharacterSet (custom)
|
||||
Encoding (SpecificEncoding)
|
||||
Pi false
|
||||
ItalicAngle 0
|
||||
CapHeight 660
|
||||
UnderlinePosition -100
|
||||
UnderlineThickness 50
|
||||
StemWidth 43
|
||||
Serif false
|
||||
AppleName (SourceCodeProL_368_wt)
|
||||
MSMenuName (Source Code Pro L_368_wt)
|
||||
VPMenuName (Source Code Pro L_368_wt)
|
||||
WORDMenuName (Source Code Pro L_368_wt)
|
||||
VPStyle (N)
|
||||
WindowsCharSet 0
|
||||
WindowsFirstChar 32
|
||||
WindowsLastChar 255
|
BIN
RomanMM/mmfont.mmm
Normal file
BIN
RomanMM/mmfont.mmm
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
RomanMM/mmfont.pfm
Normal file
BIN
RomanMM/mmfont.pfm
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
%%FONTLAB ENCODING: 20120815; Source Code Pro
|
||||
%%FONTLAB ENCODING: 20120815; Source Code Pro L
|
||||
.notdef
|
||||
NULL
|
||||
CR
|
||||
|
4
build.sh
4
build.sh
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
family=SourceCodePro
|
||||
family=SourceCodeProL
|
||||
weights='Black Bold ExtraLight Light Medium Regular Semibold'
|
||||
|
||||
# clean existing build artifacts
|
||||
@ -10,6 +10,6 @@ mkdir target/ target/OTF/ target/TTF/
|
||||
for w in $weights
|
||||
do
|
||||
makeotf -f Roman/$w/font.pfa -r -o target/OTF/$family-$w.otf
|
||||
makeotf -f Roman/$w/font.ttf -gf GlyphOrderAndAliasDB_TT -r -o target/TTF/$family-$w.ttf
|
||||
# makeotf -f Roman/$w/font.ttf -gf GlyphOrderAndAliasDB_TT -r -o target/TTF/$family-$w.ttf
|
||||
rm Roman/$w/current.fpr # remove default options file from the source tree after building
|
||||
done
|
||||
|
@ -259,3 +259,29 @@ feature size {
|
||||
parameters 10.0 0; # design size, subfamily
|
||||
} size;
|
||||
|
||||
#------------------------------
|
||||
feature liga {
|
||||
|
||||
sub less hyphen by less_hyphen; # <-
|
||||
sub hyphen greater by hyphen_greater; # ->
|
||||
sub equal greater by equal_greater; # =>
|
||||
sub greater greater equal by greater_greater_equal; # >>=
|
||||
sub equal less less by equal_less_less; # =<<
|
||||
sub greater greater by greater_greater; # >>
|
||||
sub less less by less_less; # <<
|
||||
sub period period period by period_period_period; # ...
|
||||
sub period period by period_period; # ..
|
||||
sub colon colon by colon_colon; # ::
|
||||
|
||||
sub plus plus by plus_plus; # ++
|
||||
|
||||
sub equal equal by equal_equal; # ==
|
||||
sub slash equal by slash_equal; # /=
|
||||
|
||||
sub greater greater hyphen by greater_greater_hyphen; # >>-
|
||||
sub hyphen less less by hyphen_less_less; # -<<
|
||||
sub hyphen less by hyphen_less; # -<
|
||||
sub greater hyphen by greater_hyphen; # >-
|
||||
|
||||
} liga;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user