I have a very strange effect while debugging yhmath math fonts items. I am generating cmex10.tfm from cmex10.mf, and convert the tfm to pl file.
Then I rename only rename the driver file to yrcmex10.mf, and add the following new glyph definitions in bigdel.mf, without changing anything in the rest of the files:
cmchar "\big left parenthesis";
beginchar(oct"200",8u#,rule_thickness#,2.5dh#-rule_thickness#);
adjust_fit(1.75u#,-.25u#); left_paren(hair,stem); endchar;
cmchar "\big left parenthesis";
beginchar(oct"201",10u#,rule_thickness#,3.5dh#-rule_thickness#);
adjust_fit(2.25u#,-.25u#); left_paren(hair,stem); endchar;
cmchar "\big left parenthesis";
beginchar(oct"202",12u#,rule_thickness#,4.5dh#-rule_thickness#);
adjust_fit(2.75u#,-.25u#); left_paren(hair,stem); endchar;
cmchar "\big left parenthesis";
beginchar(oct"203",13u#,rule_thickness#,5dh#-rule_thickness#);
adjust_fit(3u#,-.25u#); left_paren(hair,stem); endchar;
cmchar "\big left parenthesis";
beginchar(oct"204",15u#,rule_thickness#,6dh#-rule_thickness#);
adjust_fit(3.5u#,-.25u#); left_paren(hair,stem); endchar;
cmchar "\big left parenthesis";
beginchar(oct"205",17u#,rule_thickness#,7dh#-rule_thickness#);
adjust_fit(4u#,-.25u#); left_paren(hair,stem); endchar;
cmchar "\big left parenthesis";
beginchar(oct"206",19u#,rule_thickness#,8dh#-rule_thickness#);
adjust_fit(4.5u#,-.25u#); left_paren(hair,stem); endchar;
So the only diff between the cmex10 font and yrcmex10 font is the addition of the above characters.
Converting both tfm to pl, and making a diff I see changes in unrelated glpyphs, in particular the DP parameter changes:
--- cmex10.pl 2019-03-07 09:30:01.263513678 +0900
+++ yrcmex10.pl 2019-03-07 09:52:25.578670436 +0900
@@ -1,7 +1,7 @@
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
-(CHECKSUM O 37254272422)
+(CHECKSUM O 35311171576)
(FONTDIMEN
(SLANT R 0.0)
(SPACE R 0.0)
@@ -20,85 +20,85 @@
(CHARACTER O 0
(CHARWD R 0.458336)
(CHARHT R 0.039999)
- (CHARDP R 1.160013)
+ (CHARDP R 1.135567)
(NEXTLARGER O 20)
)
(CHARACTER O 1
(CHARWD R 0.458336)
(CHARHT R 0.039999)
- (CHARDP R 1.160013)
+ (CHARDP R 1.135567)
(NEXTLARGER O 21)
)
...
This is very surprising, I would have guessed that the glyph dimensions of other non-changed glphs do not change. Furthermore, this changes become bigger the more additional glyphs I add.
Anyone having an explanation for this?
adjust_fit, has some side-effects (but saying so is practically only an restatement of the question, not an explanation). – ShreevatsaR Mar 07 '19 at 01:04endinput.before the added code also suffices to get the original metrics. – norbert Mar 07 '19 at 03:51maketextfm --destdir ...and I don't remember seeing a warning ... – norbert Mar 07 '19 at 14:18(some chardp values had to be adjusted by as much as 0.24446pt), just didn't see it ... :-( – norbert Mar 07 '19 at 14:33.mffile, so they aren't repeated for the next or subsequent glyphs after the value is first set. If a new glyph is inserted between two such glyphs and a particular value is reset, the result can be a surprise for the glyphs following the new one. (Happens in one of the cm fonts. though I've forgotten which one; I can probably recover the info if you're interested.) – barbara beeton Mar 07 '19 at 17:03