Why do those Thai characters display on the web page with a long tail?

前端 未结 4 659
北荒
北荒 2021-02-01 16:54

ด้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้дด็็็็็้้้้้็็็็้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้

I found some interesting characters just

4条回答
  •  春和景丽
    2021-02-01 17:20

    There are two problem, one in the output system (font renderer) which is not Thai aware and one in the input system that generated this text in the first place.

    If you had done your homework, you would know that mai tho and maitaikhu (UniCode names) are what UniCode refers to as Non Spacing Markers (NSM). This means that the font renderer should not move to the next character cell when displaying this glyph.

    In order to avoid the mess you see above, the Thai API Consortium (TAPIC) made the WTT 2.0 standard that describes both how the font rendering algorithm should handle Thai letter order when it receives it as input and also how the input method should allow such characters to be input if you attempt to type them.

    Standardization and Implementations of Thai Language Overview

    libthai includes both input and output methods.

    thaicheck is a small program that can detect letter sequence problems and fix them.

    By the way, you cannot have a sequence (word) of do dek, mai tho and maitaikhu; the input sequence is noise.

    Bear in mind that some editors have broken input methods that allow typing multiple NSM that cannot be combined but the output method will render only legal sequences; the result being an illegal input string that looks OK to the user on his system.

提交回复
热议问题