Is it a bug that minus sign $2212 (a key component of $B1 Plus Minus and $F7 Divided By) uses the Plus sign ($2B) as its source, not Hyphen-Minus ($2D)?
Because it certainly bugs me!
For anyone looking for the fix, on Line 21929 of CompositeData.xml, change 43 to 45.
Happy hunting!
[NO BUG] Minus sign $2212 sourced from Plus, not Hyphen-Minus
-
- Posts: 96
- Joined: Sun Feb 22, 2015 4:35 pm
- Location: Toronto, Canada
- Contact:
[NO BUG] Minus sign $2212 sourced from Plus, not Hyphen-Minus
FC15.0 Professional
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: Minus sign $2212 sourced from Plus, not Hyphen-Minus
No. It's not a bug. The hyphen glyph may not be either horizontal or symmetrical and it is usually a different width to the plus sign.
The minus and plus signs are often the same width as the digits in fonts with lining figures. If the minus sign is generated from the plus sign, it ensures that the horizontal strokes align, and are of the same weight. The same goes for the ± sign, which is generated from plus and minus, not from plus and hyphen.
Top Row: Digit Zero
Middle: Plus, Logical Not, Plus Minus, Divides, Minus
Bottom: Hyphen $1D
The minus and plus signs are often the same width as the digits in fonts with lining figures. If the minus sign is generated from the plus sign, it ensures that the horizontal strokes align, and are of the same weight. The same goes for the ± sign, which is generated from plus and minus, not from plus and hyphen.
Top Row: Digit Zero
Middle: Plus, Logical Not, Plus Minus, Divides, Minus
Bottom: Hyphen $1D
I would not recommend this. The definition for Plus Minus also includes a line for getting the glyph metrics from glyph 43 (plus), so the width of the Plus Minus glyph will then change to match the advance width of the hyphen glyph (45).outofstepfontco wrote:For anyone looking for the fix, on Line 21929 of CompositeData.xml, change 43 to 45.
Code: Select all
<Member id="1">
<GlyphMapping>43</GlyphMapping>
<UseMetrics>TRUE</UseMetrics>
</Member>
-
- Posts: 96
- Joined: Sun Feb 22, 2015 4:35 pm
- Location: Toronto, Canada
- Contact:
Re: Minus sign $2212 sourced from Plus, not Hyphen-Minus
You guys are way too smart for me.
Where is the code you quoted? That part goes over my head.
Where is the code you quoted? That part goes over my head.
FC15.0 Professional
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: Minus sign $2212 sourced from Plus, not Hyphen-Minus
The code is quoted from CompositeData.xml lines 331-349. (I don't think mine is different to the default version, at least not there).outofstepfontco wrote:You guys are way too smart for me.
Where is the code you quoted? That part goes over my head.
Code: Select all
<Composite><!-- Plus or Minus -->
<GlyphMapping>177</GlyphMapping>
<Member id="1">
<GlyphMapping>43</GlyphMapping>
<UseMetrics>TRUE</UseMetrics>
</Member>
<Member id="2">
<GlyphMapping>8722</GlyphMapping>
</Member>
<AlignVertical>
<Source>
<Position>Baseline</Position>
</Source>
<Dest>
<Member>2</Member>
<Position>Bottom</Position>
</Dest>
</AlignVertical>
</Composite>
Keep reporting bugs if you think that you found them. I am just an amateur, and there are sure to be things that could be improved. The time required doesn't justify a lot of changes though, as users with specialist needs can and should edit the data files to suit themselves.
-
- Posts: 96
- Joined: Sun Feb 22, 2015 4:35 pm
- Location: Toronto, Canada
- Contact:
Re: Minus sign $2212 sourced from Plus, not Hyphen-Minus
Why? Glyph 177 doesn't have any references to use the metrics from 8722.Bhikkhu Pesala wrote:I would not recommend this. The definition for Plus Minus also includes a line for getting the glyph metrics from glyph 43 (plus), so the width of the Plus Minus glyph will then change to match the advance width of the hyphen glyph (45).outofstepfontco wrote:For anyone looking for the fix, on Line 21929 of CompositeData.xml, change 43 to 45.Code: Select all
<Member id="1"> <GlyphMapping>43</GlyphMapping> <UseMetrics>TRUE</UseMetrics> </Member>
FC15.0 Professional
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: Minus sign $2212 sourced from Plus, not Hyphen-Minus
It's as simple asoutofstepfontco wrote:Why? Glyph 177 doesn't have any references to use the metrics from 8722.
1 + 1 = 2
2 × 1 = 2
2 ÷ 1 = 2
4 ± 1 > 2
Maths symbols should generally be the same width as the digits for using figures and maths symbols in tables.
Most fonts will initially have the Plus sign, but few will have the Minus sign unless the user adds it.