SDL Digest, Vol 95, Issue 30

Message-ID:
<CABZtw9OTxA=Q5aLnRuvvtRhtVBGZi2w8qDEWRqt8VpFb3ErrQg at mail.gmail.com>
Content-Type: text/plain; charset=“utf-8”

Hello.

https://github.com/lxnt/zhban

A library for rendering lots of pretty text fast.

Aimed more at OpenGL than pure SDL, though can be used with pure SDL - see
test.py.

Pure C. Does not reinvent text shaping. Caches as much as makes sense. Will
support vertical and RTL scripts if there would be a test case.

I think there’s a few Japanese users of SDL, maybe one will provide
some test text and a “correct” image.

Correctly
renders most sorts of obscure scripts including Tengwar
(freemono/telcontar). Supports per-cluster fg/bg coloring.

Does it properly support all four “cases” of Arabic? There was someone
wanting to display that a few months ago.> Date: Thu, 20 Nov 2014 08:13:52 +0400

From: Alexander Sabourenkov
To: SDL Development List
Subject: [SDL] TTF text shaping

Correctly
renders most sorts of obscure scripts including Tengwar
(freemono/telcontar). Supports per-cluster fg/bg coloring.

Does it properly support all four “cases” of Arabic? There was someone
wanting to display that a few months ago.

Same thing as with vertical scripts, only it does render something instead
of failing miserably, like this: http://img.ie/9t5t0.png

I haven’t got a slightest idea how the correct Arabic looks like, someone
with domain knowledge will have to step up and help.

The code behind the renderer, though, is also behind most if not all text
shaping on Linux, so at most there are minor bugs in glyph/line
positioning, not a question of supporting this or that feature.On Fri, Nov 21, 2014 at 3:05 AM, Jared Maddox wrote:

Really wish I hadn’t used the wrong reply title last post…> Date: Fri, 21 Nov 2014 04:21:09 +0400

From: Alexander Sabourenkov
To: SDL Development List
Subject: Re: [SDL] SDL Digest, Vol 95, Issue 30
Message-ID:

Content-Type: text/plain; charset=“utf-8”

On Fri, Nov 21, 2014 at 3:05 AM, Jared Maddox <@Jared_Maddox> wrote:

Correctly
renders most sorts of obscure scripts including Tengwar
(freemono/telcontar). Supports per-cluster fg/bg coloring.

Does it properly support all four “cases” of Arabic? There was someone
wanting to display that a few months ago.

Same thing as with vertical scripts, only it does render something instead
of failing miserably, like this: http://img.ie/9t5t0.png

I haven’t got a slightest idea how the correct Arabic looks like, someone
with domain knowledge will have to step up and help.

I don’t actually know Arabic so I have no idea if that displayed
correctly, but I doubt it. Properly formatted Arabic apparently has
"isolated", “first letter of word”, “last letter of word”, and
"interior of word" cases, and multi-letter words flow like cursive
(maybe Arabic inspired cursive? I don’t know.). Given that it looks
(at least to my untrained eye) like that’s a bunch of individual
letters, I think the rendering is off.

On the upside, Hindu probably displays fine, since I understand that
to look like Morse code.

Hi, I would say the say the same. Though I don’t know Arabic, it does
not look well displayed : it should be written from Righ To Left
(RTL).
Look at the “.” that should end a paragraph : it’s positioned at the
lower right, whereas it should be at the lower left.

Other language are also RTL like Persian, Hebrew, etc.On Sat, Nov 22, 2014 at 1:22 PM, Jared Maddox wrote:

Really wish I hadn’t used the wrong reply title last post…

Date: Fri, 21 Nov 2014 04:21:09 +0400
From: Alexander Sabourenkov
To: SDL Development List
Subject: Re: [SDL] SDL Digest, Vol 95, Issue 30
Message-ID:

Content-Type: text/plain; charset=“utf-8”

On Fri, Nov 21, 2014 at 3:05 AM, Jared Maddox wrote:

Correctly
renders most sorts of obscure scripts including Tengwar
(freemono/telcontar). Supports per-cluster fg/bg coloring.

Does it properly support all four “cases” of Arabic? There was someone
wanting to display that a few months ago.

Same thing as with vertical scripts, only it does render something instead
of failing miserably, like this: http://img.ie/9t5t0.png

I haven’t got a slightest idea how the correct Arabic looks like, someone
with domain knowledge will have to step up and help.

I don’t actually know Arabic so I have no idea if that displayed
correctly, but I doubt it. Properly formatted Arabic apparently has
"isolated", “first letter of word”, “last letter of word”, and
"interior of word" cases, and multi-letter words flow like cursive
(maybe Arabic inspired cursive? I don’t know.). Given that it looks
(at least to my untrained eye) like that’s a bunch of individual
letters, I think the rendering is off.

On the upside, Hindu probably displays fine, since I understand that
to look like Morse code.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Sylvain Becker

I do know a bit of Arabic, and I can confirm what everybody else has
been saying: the text is in the wrong direction and using the wrong
letter forms. Fixing this is for the general case is unfortunately
nontrivial: the Unicode rules for bidirectional text are incredibly
complicated, and I don’t think Harfbuzz can handle this on its own.On 22.11.2014 13:31, Sylvain Becker wrote:

Hi, I would say the say the same. Though I don’t know Arabic, it does
not look well displayed : it should be written from Righ To Left
(RTL).
Look at the “.” that should end a paragraph : it’s positioned at the
lower right, whereas it should be at the lower left.


Rainer Deyke (rainerd at eldwood.com)

Many thanks for the feedback.

I have now exposed HarfBuzz settings for direction, script and language.

Does this http://img.ie/vetz5.png look better ?

Spaces and general positioning are obviously off, but that’s due to a crude
hack on a (generic LTR) line-breaking algorithm, which is not even a part
of the library yet.

I wonder if there is somewhere an adequately defined use-case for eastern
script rendering with SDL. I’d hate to not fully expose in a convenient way
what Harfbuzz can do while I’m at writing a front-end of sorts to it.

Yes, much better.On 22.11.2014 21:50, Alexander Sabourenkov wrote:

Many thanks for the feedback.

I have now exposed HarfBuzz settings for direction, script and language.

Does this http://img.ie/vetz5.png look better ?


Rainer Deyke (rainerd at eldwood.com)