[cairo] Want to stretch my fonts
Behdad Esfahbod
behdad at behdad.org
Tue Jul 27 23:58:41 PDT 2010
On 07/28/10 02:56, Kayven Riese wrote:
> but that takes only cr as an argument.. so it is going to scale my
> entire canvas right? I need to learn to make my letters on a different
> canvas and combine the two canvases or something, don't I?
Check out cairo_set_font_matrix().
behdad
> On Tue, Jul 27, 2010 at 11:50 PM, Kayven Riese <kayvey at gmail.com
> <mailto:kayvey at gmail.com>> wrote:
>
> but that takes only cr as an argument.. so it is going to scale my
> entire canvas right? I need to learn to make my letters on a
> different canvas and combine the two canvases or something, don't I?
>
>
> On Tue, Jul 27, 2010 at 11:42 PM, Andrea Canciani <ranma42 at gmail.com
> <mailto:ranma42 at gmail.com>> wrote:
>
> On Wed, Jul 28, 2010 at 8:09 AM, Kayven Riese <kayvey at gmail.com
> <mailto: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
> Andrea
>
>
>
>
> --
>
> *----------------------------------------------------------*
> Kayven Riese, BSCS,
> MS (Physiology and Biophysics)
> (415) 902 5513 cellular
> http://kayve.net
> Webmaster http://ChessYoga.org
> *----------------------------------------------------------*
>
>
>
>
>
>
> --
>
> *----------------------------------------------------------*
> Kayven Riese, BSCS,
> MS (Physiology and Biophysics)
> (415) 902 5513 cellular
> http://kayve.net
> Webmaster http://ChessYoga.org
> *----------------------------------------------------------*
>
>
>
>
>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
More information about the cairo
mailing list