Skip to content

How to render stacked Tibetan letters #2572

Description

@serser

Hello Pillow folks, I've come across this issue with stacked texts in Tibetan (po-ed stackoverflow question here).

from PIL import Image, ImageFont, ImageDraw
import matplotlib.pyplot as plt

test_letters = [u'ཀ', u'ར',u"སྤ",u'རྐ',u'༄',u'ཀྱ',u'ཛྷ']

font = ImageFont.truetype("/Libarary/Fonts/Kokonor.ttf", 20, encoding='unic')

for letter in test_letters:
    img = Image.new("RGBA", (28, 28))
    draw = ImageDraw.Draw(img)
    draw.text((6, 0),letter,(0,0,0),font)
    plt.imshow(img)
    plt.grid()
    plt.show()

One of the output is like this one, displayed apart.
image.

There are some links on Tibetan font rendering, which might of some value.

  1. https://www.microsoft.com/typography/OpenTypeDev/tibetan/intro.htm
  2. http://digitaltibetan.org/index.php/Formatting_rules_for_Tibetan_text
  3. https://collab.its.virginia.edu/wiki/tibetan-script/Using%20Tibetan%20in%20Macintoshes.html

Thanks for any illumination.

Metadata

Metadata

Assignees

Labels

BugAny unexpected behavior, until confirmed feature.Fonts

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions