> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
> Sent: Monday, June 23, 2003 14:42
> To:   Paulo Soares
> Cc:   [EMAIL PROTECTED]
> Subject:      Font scale ?
> 
> 
> 
> Hello,
> 
> Is it possible to put a "scale" on a font ?
> 
        Not for the moment using Chunks. It can be done with PdfContentByte
but you'll have to do all the calculations yourself. If all the text is
horizontally scaled you can use a ColumnText and a transformation. Links and
annotations will be in the wrong positions, though.

> Finally, that's what I want to control :
> 
> (Embedded image moved to file: pic17090.pcx)
> 
> I tried this : (getEchelle() returns a percentage)
> 
>             BaseFont bf = BaseFont.createFont(feuilleDeStyle.getPolice(),
> BaseFont.WINANSI, BaseFont.EMBEDDED);
>             Font font = new Font(bf, feuilleDeStyle.getCorps(),
> feuilleDeStyle.getStyle(), Color.BLACK);
>             if (feuilleDeStyle.getEchelle() != 1)
>             {
>                 int widths[] = bf.getWidths();
>                 for (int k = 0; k < widths.length; ++k)
>                 {
>                     widths[k] *= (feuilleDeStyle.getEchelle());
>                 }
>                 bf.setForceWidthsOutput(true);
>             }
>             return font;
> 
> but this only change the space between the origin of two consecutive
> character, and I'd like to force also the character to be "scaled", the
> changes seem to be applied on each font I create after even if its scale
> equals 1.0 ....
> 
        The fonts are cached by default but you can create a font out of the
cache with other factory method.

        Best Regards,
        Paulo Soares

> Thanks.
> 
> Pierre
> ><//�> << File: pic17090.pcx >> 


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to