0

Currently I'm working on a text rendering algorithm that samples pixels from a font atlas. The text is in a horizontal layout from left to right.

Since true type fonts support left & right bearing, it is possible that two glyphs can overlap horizontally. That means, that a horizontal pixel coordinate in the string can belong to either of the two overlapping glyphs. For example with the glyph combination "Ta" in many fonts (mostly cursive) the upper pixels in the overlapping area will belong to the T-bar while the lower pixels will belong to the left border of the a.

This would complicate the algorithm I'm developing, but it would still be fixable as long as one horizontal pixel coordinate belongs to two glyphs max.

Now my question: Are there any fonts/languages where a horizontal pixel coordinate can belong to more than two glyphs (only horizontal text, not vertical)?

Peter O.
  • 32,158
  • 14
  • 82
  • 96
user5024425
  • 397
  • 3
  • 14

1 Answers1

0

I am pretty sure that the answer is yes.

I recommend the accepted answer to RegEx match open tags except XHTML self-contained tags for a fun stress test of how badly messed up font rendering can become. (I recommend that answer anyways for its humor value.)

Community
  • 1
  • 1
btilly
  • 43,296
  • 3
  • 59
  • 88
  • 1
    Dear god.. if I knew how many overlappings the worst offender in this example has, I'm pretty sure I could make a reasonable upper limit guess. – user5024425 Jan 24 '17 at 17:53