freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Rendering Arabic


From: Tim Orton
Subject: Re: [ft] Rendering Arabic
Date: Thu, 14 Nov 2019 15:36:10 +0000

Thanks so much Simon, I'm getting the right glyphs now (both Arabic and
English) :D
I do have one last problem now though, which is that all the characters are
vertically aligned along the top of the line (also both Arabic and English).
For almost every glyph, libraqm gives an 'x_offset' and 'y_offset' of '0',
so I'm not sure how to vertically align the glyphs properly.

Example text:
[image: image.png]

Thanks again,
Tim

On Thu, 14 Nov 2019 at 11:25, Simon Cozens <address@hidden> wrote:

> On 14/11/2019 11:21, Tim Orton wrote:
> > 1) I am no longer getting any Arabic characters, and the English
> > characters are all wrong too. (Admittedly I was expecting the English
> > text to go wrong because I am hard-coding libraqm to use Arabic).
>
> This was my fault - when I said FT_Load_Char I should have said
> FT_Load_Glyph.
>
> > 2) The character metrics libraqm returns are unusable - for example the
> > x advance libraqm gives for most characters is between 200 and 900,
> > whereas the x advance I was getting from freetype is usually less than
> > 10 - so the result is that all the characters are incredibly far spread
> out.
>
> These metrics are in font units, so you need to scale them - divide by
> the font's units-per-em (face->units_per_EM) and multiply by the font size.
>
> S
>


-- 

address@hidden
+44 (0)1223 421034

*O**SO*
*SIM*

learning brought to life

www.ososim.com


Ososim Limited, Registered in England and Wales No. 06608651. Registered
Office: St John's Innovation Centre, Cowley Road, Cambridge, CB4 0WS

PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]