Skip to content

Commit

Permalink
Disabled anti-aliasing as per Old Liberation. Added script for patchi…
Browse files Browse the repository at this point in the history
…ng Liberation Mono
  • Loading branch information
pravins committed Oct 3, 2012
1 parent 607af72 commit 70efa45
Show file tree
Hide file tree
Showing 16 changed files with 157 additions and 95 deletions.
4 changes: 3 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
* Wed Oct 03 2012 Pravin Satpute <psatpute AT redhat DOT com>
- Resolved "Glyphs with multiple unicode encodings inhibit subsetting" #851790
- Resolved #851791, #854601 and #851825
- Following GASP table version 1 as per Croscore fonts
- Following GASP table version as per Liberation old version. (Anti-aliasing disabled)
- Added support for Serbian glyphs for wikipedia #657849
- In Monospace fonts, isFixedPitch bit set via script for getting it recognized as Monospace in putty.exe

* Fri Jul 06 2012 Pravin Satpute <psatpute AT redhat DOT com>
- Initial version of Liberation fonts based on croscore fonts version 1.21.0
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# 4web: dtto for TTF, WOFF, SVG, and EOT

FONTFORGE = fontforge
PYTHON = python
FONTLINT = fontlint

# TTF->EOT converters in fallback order
Expand All @@ -24,13 +25,14 @@ else
endif

EXPORTSCRIPT = scripts/fontexport.pe
FONTTOOLSCRIPT = scripts/setisFixedPitch-fonttools.py
SCRIPTS = $(EXPORTSCRIPT) scripts/sfd2ttf.pe scripts/ttf2sfd.pe
MISCFILES = AUTHORS ChangeLog LICENSE README TODO
SRCDIR = src
EXPORTDIR = export
CHECK_PREFIX = check

VER = 2.00.0
VER = 2.00.1
NAME = Liberation
VARIANTS = \
Mono-Regular Mono-Bold Mono-Italic Mono-BoldItalic \
Expand All @@ -54,6 +56,7 @@ $(EXPORTDIR):
FORMATS = ttf
ttf-dir:: $(SFDFILES)
$(FONTFORGE) -script $(EXPORTSCRIPT) -ttf $^
$(PYTHON) $(FONTTOOLSCRIPT) src/LiberationMono-*.ttf
mkdir -p $(DISTPREFIX_TTF)
mv $(addsuffix .ttf,$(basename $^)) $(DISTPREFIX_TTF)

Expand Down
1 change: 1 addition & 0 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Here are todo for next release
1) Serbian glyph for wikipedia https://bugzilla.redhat.com/show_bug.cgi?id=657849
- Improving shape of S_BE https://bugzilla.redhat.com/show_bug.cgi?id=657849#c96
2) Liberation Mono not recognizing as Mono in Windows application #861003
- presently it is patch, we have to update zero width characters to fixed width
58 changes: 58 additions & 0 deletions scripts/setisFixedPitch-fonttools.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env python
#
# setisFixedPitch-fonttools.py
#
# Copyright (c) 2012 Pravin Satpute <psatpute@redhat.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This program takes a TTF font and set isFixedPitch bit used to detect font as a Monospace.
#
# This script depends on fontTools Python library, available
# in most packaging systems and sf.net/projects/fonttools/
#
# Usage:
#
# $ ./setisFixedPitch-fonttools.py FontIn.ttf
# input font will be overwriten and backup will be created for input font

# Import our system library and fontTools ttLib
import os, sys
from fontTools import ttLib
from fontTools.ttLib.tables import ttProgram

for i in range(1, len(sys.argv)):
# Open the font file supplied as the first argument on the command line
fontfile = sys.argv[i]
print fontfile
font = ttLib.TTFont(fontfile)

# Print the Post table
if font.has_key('post'):
if font["post"].isFixedPitch == 0:
font["post"].isFixedPitch = 1
print "isFixedPitch is now: ", font["post"].isFixedPitch
else:
print "Post table not found"

# Save the new file with the name of the input file
newfont = fontfile[0:-4] + '-fixed' + fontfile[-4:]
font.save(newfont)
print newfont, "saved."

os.system("mv" + " " + "src/LiberationMono-Regular-fixed.ttf" + " " + "src/LiberationMono-Regular.ttf")
os.system("mv" + " " + "src/LiberationMono-Italic-fixed.ttf" + " " + "src/LiberationMono-Italic.ttf")
os.system("mv" + " " + "src/LiberationMono-Bold-fixed.ttf" + " " + "src/LiberationMono-Bold.ttf")
os.system("mv" + " " + "src/LiberationMono-BoldItalic-fixed.ttf" + " " + "src/LiberationMono-BoldItalic.ttf")


4 changes: 2 additions & 2 deletions src/LiberationMono-Bold.sfd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OS2Version: 3
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
CreationTime: 1277890270
ModificationTime: 1348655045
ModificationTime: 1349275460
PfmFamily: 17
TTFWeight: 700
TTFWidth: 5
Expand Down Expand Up @@ -3968,7 +3968,7 @@ ShortTable: maxp 16
1
EndShort
LangName: 1033 "" "" "" "Ascender - Liberation Mono" "" "Version 2.00.0" "" "Liberation is a trademark of Red Hat, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions." "Ascender Corporation" "Steve Matteson" "Based on Cousine, which was designed by Steve Matteson as an innovative, refreshing sans serif design that is metrically compatible with Courier New+ISIA. Cousine offers improved on-screen readability characteristics and the pan-European WGL character set and solves the needs of developers looking for width-compatible fonts to address document portability across platforms." "http://www.ascendercorp.com/" "http://www.ascendercorp.com/typedesigners.html" "Licensed under the SIL Open Font License, Version 1.1" "http://scripts.sil.org/OFL"
GaspTable: 3 8 14 14 15 65535 15
GaspTable: 3 8 2 15 1 65535 3 0
Encoding: UnicodeBmp
UnicodeInterp: none
NameList: Adobe Glyph List
Expand Down
31 changes: 15 additions & 16 deletions src/LiberationMono-BoldItalic.sfd
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ Descent: 410
LayerCount: 2
Layer: 0 1 "Back" 1
Layer: 1 1 "Fore" 0
NeedsXUIDChange: 1
XUID: [1021 445 290132255 6927612]
FSType: 0
OS2Version: 3
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
CreationTime: 1277899326
ModificationTime: 1348730022
ModificationTime: 1349275546
PfmFamily: 17
TTFWeight: 700
TTFWidth: 5
Expand Down Expand Up @@ -3699,7 +3698,7 @@ ShortTable: maxp 16
1
EndShort
LangName: 1033 "" "" "Bold Italic" "Ascender - Liberation Mono" "" "Version 2.00.0" "" "Liberation is a trademark of Red Hat, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions." "Ascender Corporation" "Steve Matteson" "Based on Cousine, which was designed by Steve Matteson as an innovative, refreshing sans serif design that is metrically compatible with Courier New+ISIA. Cousine offers improved on-screen readability characteristics and the pan-European WGL character set and solves the needs of developers looking for width-compatible fonts to address document portability across platforms." "http://www.ascendercorp.com/" "http://www.ascendercorp.com/typedesigners.html" "Licensed under the SIL Open Font License, Version 1.1" "http://scripts.sil.org/OFL"
GaspTable: 3 8 14 14 15 65535 15
GaspTable: 3 8 2 15 1 65535 3 0
Encoding: UnicodeBmp
UnicodeInterp: none
NameList: Adobe Glyph List
Expand Down Expand Up @@ -127183,7 +127182,7 @@ EndChar
StartChar: S_BE
Encoding: 65653 -1 2391
Width: 1229
Flags: HW
Flags: W
LayerCount: 2
Fore
SplineSet
Expand Down Expand Up @@ -127231,31 +127230,31 @@ EndChar
StartChar: S_TE
Encoding: 65654 -1 2392
Width: 1229
Flags: HW
Flags: W
LayerCount: 2
Fore
SplineSet
249 1371 m 5
1255 1371 l 5
1223 1203 l 5
217 1203 l 5
249 1371 l 5
249 1371 m 5,0,-1
1255 1371 l 5,1,-1
1223 1203 l 5,2,-1
217 1203 l 5,3,-1
249 1371 l 5,0,-1
EndSplineSet
Refer: 624 1096 N 1 0 0 1 0 0 2
EndChar

StartChar: S_PE
Encoding: 65655 -1 2393
Width: 1229
Flags: HW
Flags: W
LayerCount: 2
Fore
SplineSet
299 1371 m 1
1205 1371 l 1
1173 1203 l 1
267 1203 l 1
299 1371 l 1
299 1371 m 1,0,-1
1205 1371 l 1,1,-1
1173 1203 l 1,2,-1
267 1203 l 1,3,-1
299 1371 l 1,0,-1
EndSplineSet
Refer: 88 117 N 1 0 0 1 0 0 2
EndChar
Expand Down
4 changes: 2 additions & 2 deletions src/LiberationMono-Italic.sfd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OS2Version: 3
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
CreationTime: 1277886966
ModificationTime: 1348730337
ModificationTime: 1349275498
PfmFamily: 17
TTFWeight: 400
TTFWidth: 5
Expand Down Expand Up @@ -4111,7 +4111,7 @@ ShortTable: maxp 16
1
EndShort
LangName: 1033 "" "" "" "Ascender - Liberation Mono" "" "Version 2.00.0" "" "Liberation is a trademark of Red Hat, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions." "Ascender Corporation" "Steve Matteson" "Based on Cousine, which was designed by Steve Matteson as an innovative, refreshing sans serif design that is metrically compatible with Courier New+ISIA. Cousine offers improved on-screen readability characteristics and the pan-European WGL character set and solves the needs of developers looking for width-compatible fonts to address document portability across platforms." "http://www.ascendercorp.com/" "http://www.ascendercorp.com/typedesigners.html" "Licensed under the SIL Open Font License, Version 1.1" "http://scripts.sil.org/OFL"
GaspTable: 3 8 14 14 15 65535 15
GaspTable: 3 8 2 17 1 65535 3 0
Encoding: UnicodeBmp
UnicodeInterp: none
NameList: Adobe Glyph List
Expand Down
6 changes: 3 additions & 3 deletions src/LiberationMono-Regular.sfd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OS2Version: 3
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
CreationTime: 1277020711
ModificationTime: 1348652029
ModificationTime: 1349275412
PfmFamily: 17
TTFWeight: 400
TTFWidth: 5
Expand Down Expand Up @@ -3933,7 +3933,7 @@ ShortTable: maxp 16
1
EndShort
LangName: 1033 "" "" "Regular" "Ascender - Liberation Mono" "" "Version 2.00.0" "" "Liberation is a trademark of Red Hat, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions." "Ascender Corporation" "Steve Matteson" "Based on Cousine, which was designed by Steve Matteson as an innovative, refreshing sans serif design that is metrically compatible with Courier New+ISIA. Cousine offers improved on-screen readability characteristics and the pan-European WGL character set and solves the needs of developers looking for width-compatible fonts to address document portability across platforms." "http://www.ascendercorp.com/" "http://www.ascendercorp.com/typedesigners.html" "Licensed under the SIL Open Font License, Version 1.1" "http://scripts.sil.org/OFL"
GaspTable: 3 8 14 14 15 65535 15
GaspTable: 3 8 2 17 1 65535 3 0
Encoding: UnicodeBmp
UnicodeInterp: none
NameList: Adobe Glyph List
Expand Down Expand Up @@ -168714,7 +168714,7 @@ EndChar
StartChar: S_BE
Encoding: 65653 -1 2391
Width: 1229
Flags: HW
Flags: W
LayerCount: 2
Fore
SplineSet
Expand Down
6 changes: 3 additions & 3 deletions src/LiberationSans-Bold.sfd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OS2Version: 3
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
CreationTime: 1277409190
ModificationTime: 1348651568
ModificationTime: 1349271436
PfmFamily: 17
TTFWeight: 700
TTFWidth: 5
Expand Down Expand Up @@ -3743,7 +3743,7 @@ ShortTable: maxp 16
1
EndShort
LangName: 1033 "" "" "" "Ascender - Liberation Sans" "" "Version 2.00.0" "" "Liberation is a trademark of Red Hat, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions." "Ascender Corporation" "Steve Matteson" "Based on Arimo, which was designed by Steve Matteson as an innovative, refreshing sans serif design that is metrically compatible with Arial+ISIA. Arimo offers improved on-screen readability characteristics and the pan-European WGL character set and solves the needs of developers looking for width-compatible fonts to address document portability across platforms." "http://www.ascendercorp.com/" "http://www.ascendercorp.com/typedesigners.html" "Licensed under the SIL Open Font License, Version 1.1" "http://scripts.sil.org/OFL"
GaspTable: 3 8 14 14 15 65535 15
GaspTable: 3 8 2 10 3 65535 3 0
Encoding: UnicodeBmp
UnicodeInterp: none
NameList: Adobe Glyph List
Expand Down Expand Up @@ -189765,7 +189765,7 @@ EndChar
StartChar: S_BE
Encoding: 65828 -1 2586
Width: 1242
Flags: HW
Flags: W
LayerCount: 2
Fore
SplineSet
Expand Down
30 changes: 15 additions & 15 deletions src/LiberationSans-BoldItalic.sfd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OS2Version: 3
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
CreationTime: 1277744832
ModificationTime: 1348662641
ModificationTime: 1349271530
PfmFamily: 17
TTFWeight: 700
TTFWidth: 5
Expand Down Expand Up @@ -3665,7 +3665,7 @@ ShortTable: maxp 16
1
EndShort
LangName: 1033 "" "" "Bold Italic" "Ascender - Liberation Sans" "" "Version 2.00.0" "" "Liberation is a trademark of Red Hat, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions." "Ascender Corporation" "Steve Matteson" "Based on Arimo, which was designed by Steve Matteson as an innovative, refreshing sans serif design that is metrically compatible with Arial+ISIA. Arimo offers improved on-screen readability characteristics and the pan-European WGL character set and solves the needs of developers looking for width-compatible fonts to address document portability across platforms." "http://www.ascendercorp.com/" "http://www.ascendercorp.com/typedesigners.html" "Licensed under the SIL Open Font License, Version 1.1" "http://scripts.sil.org/OFL"
GaspTable: 2 8 14 65535 15
GaspTable: 3 8 2 10 1 65535 3 0
Encoding: UnicodeBmp
UnicodeInterp: none
NameList: Adobe Glyph List
Expand Down Expand Up @@ -179661,7 +179661,7 @@ EndChar
StartChar: S_BE
Encoding: 65828 -1 2586
Width: 1242
Flags: HW
Flags: W
LayerCount: 2
Fore
SplineSet
Expand Down Expand Up @@ -179709,31 +179709,31 @@ EndChar
StartChar: S_TE
Encoding: 65829 -1 2587
Width: 1821
Flags: HW
Flags: W
LayerCount: 2
Fore
SplineSet
1763 1203 m 5
297 1203 l 5
330 1371 l 5
1800 1371 l 5
1763 1203 l 5
1763 1203 m 5,0,-1
297 1203 l 5,1,-1
330 1371 l 5,2,-1
1800 1371 l 5,3,-1
1763 1203 l 5,0,-1
EndSplineSet
Refer: 621 1096 N 1 0 0 1 0 0 2
EndChar

StartChar: S_PE
Encoding: 65830 -1 2588
Width: 1251
Flags: HW
Flags: W
LayerCount: 2
Fore
SplineSet
1203 1203 m 1
284 1203 l 1
317 1371 l 1
1240 1371 l 1
1203 1203 l 1
1203 1203 m 1,0,-1
284 1203 l 1,1,-1
317 1371 l 1,2,-1
1240 1371 l 1,3,-1
1203 1203 l 1,0,-1
EndSplineSet
Refer: 88 117 N 1 0 0 1 0 0 2
EndChar
Expand Down
Loading

0 comments on commit 70efa45

Please sign in to comment.