Skip to main content
added 684 characters in body
Source Link
Martijn Pieters Mod
  • 1.1m
  • 96
  • 930
  • 755

This is not an issue Stack Overflow can fix. Those specific Unicode characters do not have a fixed width consistent with other codepoints, consistently, across all fonts.

Yes, this is true even though a fixed-width (monospaced) font is selected. That's because Unicode contains codepoints that are explicitly marked as having a different width from other codepoints (the East-Asian width table), which includes a whole range of ambiguous width codepoints, and font designers are free to pick widths for everything else.

This is also an issue for block elements, for which Wikipedia explicitly mentions font issues:

The glyphs in Block Elements each share the same character width in most supported fonts, allowing them to be used graphically in row and column arrangements. However, the block doesn't contain a space character of its own and ASCII space may or may not render at the same width as Block Elements glyphs. This fatal flaw tends to discourage their use, as rendering across platforms and browsers is rarely consistent. A common workaround for this is using light shade instead of a space.

You could try to override your local font settings with a custom stylesheet or your browser settings and using a font that would render the characters at a fixed width, but you can't rely on everyone having such a font.

I see the issue too because I've got the Consolas font installed on my Mac; this is not a font that is installed by default, you have to explicitly download and install it on Macs. If I disable that font then Menlo is used, and that font does use the same widths for line drawing codepoints and ASCII. However, Consolas will render other kinds of monospace characters better than Menlo could, on Windows systems, and there is a trade-off to be made in selecting the list of fonts for code blocks for a site like Stack Overflow, which has such a wide range of different texts to deal with.

This is not an issue Stack Overflow can fix. Those specific Unicode characters do not have a fixed width consistent with other codepoints, consistently, across all fonts.

Yes, this is true even though a fixed-width (monospaced) font is selected. That's because Unicode contains codepoints that are explicitly marked as having a different width from other codepoints (the East-Asian width table), which includes a whole range of ambiguous width codepoints, and font designers are free to pick widths for everything else.

This is also an issue for block elements, for which Wikipedia explicitly mentions font issues:

The glyphs in Block Elements each share the same character width in most supported fonts, allowing them to be used graphically in row and column arrangements. However, the block doesn't contain a space character of its own and ASCII space may or may not render at the same width as Block Elements glyphs. This fatal flaw tends to discourage their use, as rendering across platforms and browsers is rarely consistent. A common workaround for this is using light shade instead of a space.

You could try to override your local font settings with a custom stylesheet or your browser settings and using a font that would render the characters at a fixed width, but you can't rely on everyone having such a font.

This is not an issue Stack Overflow can fix. Those specific Unicode characters do not have a fixed width consistent with other codepoints, consistently, across all fonts.

Yes, this is true even though a fixed-width (monospaced) font is selected. That's because Unicode contains codepoints that are explicitly marked as having a different width from other codepoints (the East-Asian width table), which includes a whole range of ambiguous width codepoints, and font designers are free to pick widths for everything else.

This is also an issue for block elements, for which Wikipedia explicitly mentions font issues:

The glyphs in Block Elements each share the same character width in most supported fonts, allowing them to be used graphically in row and column arrangements. However, the block doesn't contain a space character of its own and ASCII space may or may not render at the same width as Block Elements glyphs. This fatal flaw tends to discourage their use, as rendering across platforms and browsers is rarely consistent. A common workaround for this is using light shade instead of a space.

You could try to override your local font settings with a custom stylesheet or your browser settings and using a font that would render the characters at a fixed width, but you can't rely on everyone having such a font.

I see the issue too because I've got the Consolas font installed on my Mac; this is not a font that is installed by default, you have to explicitly download and install it on Macs. If I disable that font then Menlo is used, and that font does use the same widths for line drawing codepoints and ASCII. However, Consolas will render other kinds of monospace characters better than Menlo could, on Windows systems, and there is a trade-off to be made in selecting the list of fonts for code blocks for a site like Stack Overflow, which has such a wide range of different texts to deal with.

Source Link
Martijn Pieters Mod
  • 1.1m
  • 96
  • 930
  • 755

This is not an issue Stack Overflow can fix. Those specific Unicode characters do not have a fixed width consistent with other codepoints, consistently, across all fonts.

Yes, this is true even though a fixed-width (monospaced) font is selected. That's because Unicode contains codepoints that are explicitly marked as having a different width from other codepoints (the East-Asian width table), which includes a whole range of ambiguous width codepoints, and font designers are free to pick widths for everything else.

This is also an issue for block elements, for which Wikipedia explicitly mentions font issues:

The glyphs in Block Elements each share the same character width in most supported fonts, allowing them to be used graphically in row and column arrangements. However, the block doesn't contain a space character of its own and ASCII space may or may not render at the same width as Block Elements glyphs. This fatal flaw tends to discourage their use, as rendering across platforms and browsers is rarely consistent. A common workaround for this is using light shade instead of a space.

You could try to override your local font settings with a custom stylesheet or your browser settings and using a font that would render the characters at a fixed width, but you can't rely on everyone having such a font.