freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] How to implent wrapping !!!


From: Werner LEMBERG
Subject: Re: [ft-devel] How to implent wrapping !!!
Date: Wed, 08 Aug 2007 09:03:22 +0200 (CEST)

> When i write some text using freetype, How can i come to know that i
> reach end of line....  i.e
> xsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaEnd
> 
> after 'd' i should come to know that i reach end of line, so that i
> can move to next line

This depends on the language.  For example, in Chinese and Japanese,
you can insert a line break everywhere, except a small list of
characters.  In almost all other languages you insert a break after at
whitespace characters.

Some remarks:

  . This question is off-topic, because it belongs to stuff which has
    to be handled at least one level higher than FreeType.  Our
    library just fills a bitmap with an image of a glyph, nothing
    more.

  . There are good libraries like Pango, Qt, and ICU which can do all
    these things already.  I strongly recommend to study the code of
    those packages for further details.  Most of these formatting
    issues can be vary nasty in case you want to implement an
    universal solution.  Don't reinvent the wheel!

  . At www.unicode.org you can find databases which exactly describe
    the properties of all defined glyphs.  There you can also find
    various technical reports which handle line breaking also, IIRC.


       Werner




reply via email to

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