[cairo] Want to stretch my fonts

Andrea Canciani ranma42 at gmail.com
Tue Jul 27 23:42:00 PDT 2010

On Wed, Jul 28, 2010 at 8:09 AM, Kayven Riese <kayvey at gmail.com> wrote:
> Hi, I have attached four files (oops five--see below) so that if somebody
> has a UNIX command line hopefully you just save them and do "make stub" and
> you can run my code. For compatibility here is my CentOS uname:
> [root at localhost ~]# uname -a
> Linux localhost 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 19:04:48 EDT 2010 x86_64
> x86_64 x86_64 GNU/Linux
> [root at localhost ~]#
> My goal is to create a "cellgam.png" but to have more control over the
> font.  I want to stretch it vertically.  In the example, I think I ran the
> program with the command
> ./stub 2 2 3 3
> which means that 20% of the proteins are nuclear.  I want the word "Nuclear"
> to have an extent that represents 20% of the vertical height of the diagram,
> but I want it to still be contained in my "cell" the rounded rectangle I
> have drawn.  The rectangle is intended to have a vertical extent propotional
> to the first three arguments.
> All that is a ball of wax I can handle.  The only thing I am asking is how
> do I control what is happening to my text to transform it vertically within
> a box that I chose.  I got the idea for what I am doing from the fifth file
> I just attached, "bp_font.jpeg"  I want to be able to stretch the word
> "Nuclear" so it is taller, but control the width to be narrower to still fit
> inside my cell.
You can't do that just by changing the font size. You should use
cairo_scale with
appropriate arguments (see
http://cairographics.org/manual/cairo-transformations.html )
Hope this helps

More information about the cairo mailing list