[NO BUG] Minus sign $2212 sourced from Plus, not Hyphen-Minus

Post your bug reports here. Include information that helps us to understand and reproduce the bug.
Post Reply
outofstepfontco
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

Post by outofstepfontco »

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!
FC15.0 Professional
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9877
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Minus sign $2212 sourced from Plus, not Hyphen-Minus

Post by Bhikkhu Pesala »

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.
Maths Symbols.png
Maths Symbols.png (33.65 KiB) Viewed 5069 times
Top Row: Digit Zero
Middle: Plus, Logical Not, Plus Minus, Divides, Minus
Bottom: Hyphen $1D
outofstepfontco wrote:For anyone looking for the fix, on Line 21929 of CompositeData.xml, change 43 to 45.
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).

Code: Select all

	<Member id="1">
	<GlyphMapping>43</GlyphMapping>
		<UseMetrics>TRUE</UseMetrics>
	</Member>
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
outofstepfontco
Posts: 96
Joined: Sun Feb 22, 2015 4:35 pm
Location: Toronto, Canada
Contact:

Re: Minus sign $2212 sourced from Plus, not Hyphen-Minus

Post by outofstepfontco »

You guys are way too smart for me.

Where is the code you quoted? That part goes over my head.
FC15.0 Professional
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9877
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Minus sign $2212 sourced from Plus, not Hyphen-Minus

Post by Bhikkhu Pesala »

outofstepfontco wrote:You guys are way too smart for me.

Where is the code you quoted? That part goes over my head.
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).

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>
Composite Data Update explains more about editing CompositeData.xml if you need to.

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.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
outofstepfontco
Posts: 96
Joined: Sun Feb 22, 2015 4:35 pm
Location: Toronto, Canada
Contact:

Re: Minus sign $2212 sourced from Plus, not Hyphen-Minus

Post by outofstepfontco »

Bhikkhu Pesala wrote:
outofstepfontco wrote:For anyone looking for the fix, on Line 21929 of CompositeData.xml, change 43 to 45.
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).

Code: Select all

	<Member id="1">
	<GlyphMapping>43</GlyphMapping>
		<UseMetrics>TRUE</UseMetrics>
	</Member>
Why? Glyph 177 doesn't have any references to use the metrics from 8722.
FC15.0 Professional
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9877
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Minus sign $2212 sourced from Plus, not Hyphen-Minus

Post by Bhikkhu Pesala »

outofstepfontco wrote:Why? Glyph 177 doesn't have any references to use the metrics from 8722.
It's as simple as

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.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Post Reply