fonts: Install Liberation fonts using their fake name.
For homogeneity with the other fake fonts. That's mostly cosmetic.
This commit is contained in:
parent
7e10a41649
commit
4378ee718a
3 changed files with 34 additions and 29 deletions
31
Makefile.in
31
Makefile.in
|
@ -765,31 +765,36 @@ noto_sans_teluguui.ttf = $(FONTS)/noto/NotoSansTeluguUI-Regular.ttf
|
|||
nirmala.ttf = $(FONTS_OBJ)/nirmala.ttf
|
||||
|
||||
#The use of "Arial" here is for compatibility with programs that require that exact string. This font is not Arial.
|
||||
LiberationSans-Regular_NAMES := "Arial" "Arial" "Arial"
|
||||
arial_NAMES := "Arial" "Arial" "Arial"
|
||||
arial_ORIG := LiberationSans-Regular
|
||||
#The use of "Arial" here is for compatibility with programs that require that exact string. This font is not Arial.
|
||||
LiberationSans-Bold_NAMES := "Arial-Bold" "Arial" "Arial Bold"
|
||||
arialbd_NAMES := "Arial-Bold" "Arial" "Arial Bold"
|
||||
arialbd_ORIG := LiberationSans-Bold
|
||||
#The use of "Times New Roman" here is for compatibility with programs that require that exact string. This font is not Times New Roman.
|
||||
LiberationSerif-Regular_NAMES := "TimesNewRoman" "Times New Roman" "Times New Roman"
|
||||
times_NAMES := "TimesNewRoman" "Times New Roman" "Times New Roman"
|
||||
times_ORIG := LiberationSerif-Regular
|
||||
#The use of "Courier New" here is for compatibility with programs that require that exact string. This font is not Courier New.
|
||||
LiberationMono-Regular_NAMES := "CourierNew" "Courier New" "Courier New"
|
||||
LiberationMono-Regular_PATCH := $(FONTS)/patches/LiberationMono-Regular.patch
|
||||
cour_NAMES := "CourierNew" "Courier New" "Courier New"
|
||||
cour_PATCH := $(FONTS)/patches/LiberationMono-Regular.patch
|
||||
cour_ORIG := LiberationMono-Regular
|
||||
#The use of "Courier New" here is for compatibility with programs that require that exact string. This font is not Courier New.
|
||||
LiberationMono-Bold_NAMES := "CourierNewPS-BoldMT" "Courier New" "Courier New Bold"
|
||||
courbd_NAMES := "CourierNewPS-BoldMT" "Courier New" "Courier New Bold"
|
||||
courbd_ORIG := LiberationMono-Bold
|
||||
|
||||
$(FONTS_OBJ):
|
||||
mkdir -p $@
|
||||
|
||||
$(FONTS_OBJ)/%.ttf: $(FONTS_OBJ)/%.sfd $(FONTSCRIPT) | $(FONTS_OBJ)
|
||||
$(FONTFORGE) -script $(FONTSCRIPT) $< $($(*)_NAMES)
|
||||
$(FONTS_OBJ)/%.ttf: $(FONTS_OBJ)/$$($$(*)_ORIG).sfd $(FONTSCRIPT) | $(FONTS_OBJ)
|
||||
$(FONTFORGE) -script $(FONTSCRIPT) $< $($(*)_NAMES) $@
|
||||
|
||||
$(FONTS_OBJ)/%.sfd: $(LIBERATION_SRCDIR)/%.sfd | $(FONTS_OBJ)
|
||||
patch $< -o $@ $(firstword $($(*)_PATCH) /dev/null)
|
||||
|
||||
fonts: $(FONTS_OBJ)/LiberationSans-Regular.ttf
|
||||
fonts: $(FONTS_OBJ)/LiberationSans-Bold.ttf
|
||||
fonts: $(FONTS_OBJ)/LiberationSerif-Regular.ttf
|
||||
fonts: $(FONTS_OBJ)/LiberationMono-Regular.ttf
|
||||
fonts: $(FONTS_OBJ)/LiberationMono-Bold.ttf
|
||||
fonts: $(FONTS_OBJ)/arial.ttf
|
||||
fonts: $(FONTS_OBJ)/arialbd.ttf
|
||||
fonts: $(FONTS_OBJ)/times.ttf
|
||||
fonts: $(FONTS_OBJ)/cour.ttf
|
||||
fonts: $(FONTS_OBJ)/courbd.ttf
|
||||
|
||||
#The use of "YaHei" for compatibility with programs that require that exact string. This font is not Microsoft YaHei.
|
||||
$(FONTS_OBJ)/source-han/%.ttf: $$(%.ttf_CIDFONT) $$(%.ttf_FEATURES) $$(%.ttf_SEQUENCES) $$(%.ttf_UNISOURCE) $$(%.ttf_MENUNAMEDB)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
if ($argc != 5)
|
||||
Error ("Expected arguments - FileName, PSName, FamilyName, FaceName")
|
||||
if ($argc != 6)
|
||||
Error ("Expected arguments - FileName, PSName, FamilyName, FaceName, OutFileName")
|
||||
endif
|
||||
|
||||
Open($1)
|
||||
SetFontNames($argv[2], $argv[3], $argv[4])
|
||||
Generate($1:r + ".ttf")
|
||||
Generate($5)
|
||||
|
|
26
proton
26
proton
|
@ -707,25 +707,25 @@ class CompatData:
|
|||
|
||||
def create_fonts_symlinks(self):
|
||||
fontsmap = [
|
||||
( g_proton.fonts_dir, "LiberationSans-Regular.ttf", "arial.ttf" ),
|
||||
( g_proton.fonts_dir, "LiberationSans-Bold.ttf", "arialbd.ttf" ),
|
||||
( g_proton.fonts_dir, "LiberationSerif-Regular.ttf", "times.ttf" ),
|
||||
( g_proton.fonts_dir, "LiberationMono-Regular.ttf", "cour.ttf" ),
|
||||
( g_proton.fonts_dir, "LiberationMono-Bold.ttf", "courbd.ttf" ),
|
||||
( g_proton.fonts_dir, "msyh.ttf", "msyh.ttf" ),
|
||||
( g_proton.fonts_dir, "simsun.ttc", "simsun.ttc" ),
|
||||
( g_proton.fonts_dir, "msgothic.ttc", "msgothic.ttc" ),
|
||||
( g_proton.fonts_dir, "malgun.ttf", "malgun.ttf" ),
|
||||
( g_proton.fonts_dir, "micross.ttf", "micross.ttf" ),
|
||||
( g_proton.fonts_dir, "nirmala.ttf", "nirmala.ttf" ),
|
||||
( g_proton.fonts_dir, "arial.ttf" ),
|
||||
( g_proton.fonts_dir, "arialbd.ttf" ),
|
||||
( g_proton.fonts_dir, "times.ttf" ),
|
||||
( g_proton.fonts_dir, "cour.ttf" ),
|
||||
( g_proton.fonts_dir, "courbd.ttf" ),
|
||||
( g_proton.fonts_dir, "msyh.ttf" ),
|
||||
( g_proton.fonts_dir, "simsun.ttc" ),
|
||||
( g_proton.fonts_dir, "msgothic.ttc" ),
|
||||
( g_proton.fonts_dir, "malgun.ttf" ),
|
||||
( g_proton.fonts_dir, "micross.ttf" ),
|
||||
( g_proton.fonts_dir, "nirmala.ttf" ),
|
||||
|
||||
( g_proton.wine_fonts_dir, "tahoma.ttf", "tahoma.ttf" ),
|
||||
( g_proton.wine_fonts_dir, "tahoma.ttf" ),
|
||||
]
|
||||
|
||||
windowsfonts = self.prefix_dir + "/drive_c/windows/Fonts"
|
||||
makedirs(windowsfonts)
|
||||
for p in fontsmap:
|
||||
lname = os.path.join(windowsfonts, p[2])
|
||||
lname = os.path.join(windowsfonts, p[1])
|
||||
fname = os.path.join(p[0], p[1])
|
||||
if file_exists(lname, follow_symlinks=False):
|
||||
if os.path.islink(lname):
|
||||
|
|
Loading…
Reference in a new issue