[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Rendering Arabic
From: |
Simon Cozens |
Subject: |
Re: [ft] Rendering Arabic |
Date: |
Mon, 4 Nov 2019 10:30:19 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Thunderbird/71.0a1 |
On 04/11/2019 10:19, Tim Orton wrote:
I can render simple text with freetype, and I have just started using
libraqm for glyph shaping, for complex text.
Basically, I can get information from libraqm about the glyph index,
offset, advance, etc... but I don't know how to use that to get the
bitmap of the glyph to render.
Sorry this question is more about libraqm than freetype, but I can't
find another community to ask this question.
Hi again Tim,
Actually, this *is* a freetype question! There is a division of labour
between the shaping engine and the glyph rendering engine. Shaping
(libraqm) tells you what glyph you want and where to put it. Rendering
tells you what it looks like.
So, you've already got the glyph selection and positioning information
from libraqm. That's step one. Step two depends on a bit on what kind of
canvas you're rendering onto, but the basic idea is that you can now
(using freetype) select the glyph from the font by ID:
FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );
and then you can get its bitmap as you normally would and position it
onto your canvas in the place that libraqm told you to put it.
Hope that is clearer - if not, keep asking (you may need to show some code)!
Simon