Menu

#21 Fix accidental G3 char modification

open
nobody
None
5
2019-10-05
2019-01-01
No

When parsed enhanced Teletext features are flushed using enhance_flush in teletext.c, specific processing is applied to the internally used unicode representation of graphic characters (G1 and G3 charsets): Depending on whether the underlined flag is set or not, the 0x20 bit of the private unicode value is set or reset. Regarding G1 this switches between the separated and the contiguous version of a character (both are included in the supplied WST font file).

For each G3 character however, there is no such separate/contiguous distinction and hence only one character version present in the font file, as the underlined flag has no meaning here. So currently the described processing actually modifies the value of the desired chracters and leads to incorrect rendering.

Please find a patch attached that fixes the described behaviour. Note that I haven't entirely checked the internal meanings of:
- es->ac.unicode
- es->ac.underline
- es->mac.unicode
- es->mac.underline
So there may be a more elegant way to do this. It could also make sense to move unicode < 0xEF00 to a separate function.

Currently this bug affects rendering of the Level 2.5 page 100 of the German TV station PHOENIX, which uses a sophisticated combination of DRCS, G1 and G3 characters to create a less pixelated version of the station logo. In this case the G3 character 0x50 is incorrectly rendered as 0x70, as the 0x20 bit is set by the described processing.

Please see the attached screenshots for the rendering result before/after the patch is applied (using VLC).

1 Attachments

Discussion

  • Stefan Pöschel

    Stefan Pöschel - 2019-01-01

    Rendering before patch

     
  • Stefan Pöschel

    Stefan Pöschel - 2019-01-01

    Rendering after patch

     
  • Stefan Pöschel

    Stefan Pöschel - 2019-10-05

    I just wanted to ask if there is something new here meanwhile.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.