Re: [Gimp-developer] gimp-text-extents-fontname et unicode

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

 



Hi,

Jean-Christophe Dubacq <jean-christophe.dubacq@xxxxxxxxxxxx> writes:

>   I have found something quite strange. Using locale UTF-8, if I use
>   gimp-text-extents-fontname, I find different results according to the
>   encoding used.
> 
>   My font is arial narrow (monotype), which comes as a TTF, and I use
>   the native truetype interpreter of XFree (probably Freetype2).
> 
>   When used with some sample string ("a") in iso8859-1 and 24 pixels:
> => (gimp-text-get-extents-fontname "a" 24 PIXELS
> "-monotype-arial-bold-r-condensed--0-0-0-0-p-0-iso8859-1")
> 
> (16 27 22 5)
> 
> => (gimp-text-get-extents-fontname "a" 24 PIXELS
> "-monotype-arial-bold-r-condensed--0-0-0-0-p-0-iso10646-1")
> 
> 
> (16 42 37 5)
> 
> This is all correct, except if antialiasing is chosen. If antialiasing
> is enabled, then the placement (and size) of the text is the same in
> both cases (try:
> (gimp-text-fontname 0 -1 0 0 "a" -1 TRUE 24 PIXELS
> "-monotype-arial-bold-r-condensed--0-0-0-0-p-0-iso10646-1")
> and
> (gimp-text-fontname 0 -1 0 0 "a" -1 TRUE 24 PIXELS
> "-monotype-arial-bold-r-condensed--0-0-0-0-p-0-iso8859-1")
> )
> 
> which is obviously somehow wrong, since this doesn't correspond any more
> to the extents data (especially when trying to underline some
> anti-aliased text in unicode :).

if you use antialiasing, gimp-1.2 requests a font three times as large
as the one you specified and scales it down (in order to get some sort
of cheap AA). Most probably the font server uses the same font for
both requests at this size.


Salut, Sven


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux