[gentium-commits] [SCM] gentium updated: r38 - trunk/gentium/source/fonts/gentium-tug/type1
Pavel Far??
INVALID.NOREPLY at gnu.org.ua
Sun Mar 20 13:14:27 CET 2022
Author: pavel
Date: 2022-03-20 12:14:27 +0000 (Sun, 20 Mar 2022)
New Revision: 38
Modified:
trunk/gentium/source/fonts/gentium-tug/type1/README
trunk/gentium/source/fonts/gentium-tug/type1/kerncorrection.py
Log:
fix kerning for small caps
Old fonts used x.SC for small caps, new fonts use x.sc.
Modified: trunk/gentium/source/fonts/gentium-tug/type1/README
===================================================================
--- trunk/gentium/source/fonts/gentium-tug/type1/README 2022-03-19 19:06:26 UTC (rev 37)
+++ trunk/gentium/source/fonts/gentium-tug/type1/README 2022-03-20 12:14:27 UTC (rev 38)
@@ -25,7 +25,9 @@
The usual usage is just 'make' which converts the fonts, deletes the
intermediate files and checks the fonts with t1lint.
+You might need to call 'make' twice for all kerning changes to propagate!
+
File dependency tree
====================
@@ -54,7 +56,7 @@
Generates kerning pairs for the combinations accent + capital Greek letter.
kerncorrection.py
- Generates kerning pairs for the accented Latin letters small caps and some
+ Generates kerning pairs for the accented Latin letters, small caps and some
combinations with quotes or punctuation.
Gentium*-Czech.kern
Modified: trunk/gentium/source/fonts/gentium-tug/type1/kerncorrection.py
===================================================================
--- trunk/gentium/source/fonts/gentium-tug/type1/kerncorrection.py 2022-03-19 19:06:26 UTC (rev 37)
+++ trunk/gentium/source/fonts/gentium-tug/type1/kerncorrection.py 2022-03-20 12:14:27 UTC (rev 38)
@@ -4,6 +4,8 @@
# Used uni0162 for Tcedilla and uni021A for Tcommaaccent
+# TODO: use variable for the small caps extension '.sc'
+
import os, sys, re
@@ -27,7 +29,7 @@
class KernWriter:
# TODO: improve methods for quotes; probably merge them; also accented small caps; look
# also at other types of quotes, such as Polish and French; start with improving
- # aacute.SC + quotedblleft and adieresis.SC + quotedblleft
+ # aacute.sc + quotedblleft and adieresis.sc + quotedblleft
# TODO: several methods could be merged (simpler code, but worse result to report to Victor)
kernpairscapital = [
["V A", "V Aacute", "V Abreve", "V Acircumflex", "V Adieresis", "V AE", "V Agrave", "V Amacron", "V Aogonek", "V Aring", "V Atilde"],
@@ -144,19 +146,19 @@
def writetofile(self, s):
# This method writes one extra kerning pair to the output file.
# It also makes correction for small cap Tcommaaccent and Tcedilla.
- # Tcedilla is uni0162 and the small cap is uni0163.SC, not
- # uni0162.SC. Tcommaaccent is uni021A and the small cap is uni021B.SC,
- # not uni021a.SC (look also at the small "a"; there is problem not only
+ # Tcedilla is uni0162 and the small cap is uni0163.sc, not
+ # uni0162.sc. Tcommaaccent is uni021A and the small cap is uni021B.sc,
+ # not uni021a.sc (look also at the small "a"; there is problem not only
# in the unicode value, but also in the case, because method lower() is
# used).
- self.f.write(s.replace("uni021a.SC", "uni021B.SC").replace("uni0162.SC", "uni0163.SC"))
+ self.f.write(s.replace("uni021a.sc", "uni021B.sc").replace("uni0162.sc", "uni0163.sc"))
def smallcaps(self, fromreader, kernfactor):
a = fromreader.getkerns("KPX [A-Z] [A-Z]")
for s in a:
parts = s.split()
- self.writetofile("KPX " + parts[1].lower() + ".SC " + parts[2].lower() +
- ".SC " + str(int(round(kernfactor * float(parts[3])))) +
+ self.writetofile("KPX " + parts[1].lower() + ".sc " + parts[2].lower() +
+ ".sc " + str(int(round(kernfactor * float(parts[3])))) +
'\n')
def initialcap(self, fromreader, kernfactor):
@@ -163,7 +165,7 @@
a = fromreader.getkerns("KPX [A-Z] [A-Z]")
for s in a:
parts = s.split()
- self.writetofile("KPX " + parts[1] + " " + parts[2].lower() + ".SC " +
+ self.writetofile("KPX " + parts[1] + " " + parts[2].lower() + ".sc " +
str(int(round(kernfactor * float(parts[3])))) + '\n')
def rightpunctuation(self, fromreader, kernfactor):
@@ -174,7 +176,7 @@
a.extend(fromreader.getkerns("KPX [A-Z] quoteright"))
for s in a:
parts = s.split()
- self.writetofile("KPX " + parts[1].lower() + ".SC " + parts[2] + " " +
+ self.writetofile("KPX " + parts[1].lower() + ".sc " + parts[2] + " " +
str(int(round(kernfactor * float(parts[3])))) + '\n')
def leftpunctuation(self, fromreader, kernfactor):
@@ -183,7 +185,7 @@
a.extend(fromreader.getkerns("KPX quoteleft [A-Z]"))
for s in a:
parts = s.split()
- self.writetofile("KPX " + parts[1] + " " + parts[2].lower() + ".SC " +
+ self.writetofile("KPX " + parts[1] + " " + parts[2].lower() + ".sc " +
str(int(round(kernfactor * float(parts[3])))) + '\n')
def accentedcapitalletters(self, fromreader):
@@ -215,8 +217,8 @@
for b in derivedkerns:
newkernline = kernline.replace(basekern, b)
parts = newkernline.split()
- self.writetofile("KPX " + parts[1].lower() + ".SC " + parts[2].lower() +
- ".SC " + str(int(round(kernfactor * float(parts[3])))) +
+ self.writetofile("KPX " + parts[1].lower() + ".sc " + parts[2].lower() +
+ ".sc " + str(int(round(kernfactor * float(parts[3])))) +
'\n')
def accentedinitialcap(self, fromreader):
@@ -238,7 +240,7 @@
for b in derivedkerns:
newkernline = kernline.replace(basekern, b)
parts = newkernline.split()
- self.writetofile("KPX " + parts[1] + " " + parts[2].lower() + ".SC " +
+ self.writetofile("KPX " + parts[1] + " " + parts[2].lower() + ".sc " +
str(int(round(kernfactor * float(parts[3])))) + '\n')
def accentedrightpunctuation(self, fromreader):
More information about the gentium-commits
mailing list.