C Library Functions  - textsize (3)

NAME

textsize(3f) - [M_pixel:TEXT] set text size in world units (LICENSE:PD)

CONTENTS

Synopsis
Description
Example
Author
License

SYNOPSIS

definition:

   subroutine textsize(width, height)
   real,intent(in) :: width
   real,intent(in) :: height

DESCRIPTION

Set the maximum size of a character in the current font. Width and height are values in world units. This only applies to software text. This must be done after the font being scaled is loaded. To keep text of different sizes aligned along the same baseline note that you typically need to subtrace the descender height from the Y position.

EXAMPLE

Sample program:

   program demo_textsize
   use M_pixel
   use M_pixel__writegif, only : writegif
   implicit none
   integer :: i,ii
      !! set up long bar as plotting area
      call prefsize(900,150)
      call vinit()
      call ortho2(-30.0, 30.0, -5.0, 5.0)
      call font(’DUPLEX’)
      call move2(-23.0,-4.5)
      call color(7)
      call textsize(2.0,2.0)
      call move2(-27.5,-3.0)
      call draw2( 27.5,-3.0)
      call move2(-27.5,-3.0)
      do i=1,7
         ii=nint((i*20)*0.30)
         call linewidth(nint(ii*2.35))
         call textsize(real(i),real(i))
         call color(5)
         call drawstr(’aA’)
      enddo
      ! write plot as GIF file
      call writegif(’textsize.3M_pixel.gif’,P_pixel,P_colormap)
      call vexit()
      ! use system to display GIF file
      call execute_command_line(’display textsize.3M_pixel.gif’)
   end program demo_textsize

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 textsize (3) July 22, 2023
Generated by manServer 1.08 from e3861c56-34f5-4fc8-9543-a4e81564a97f using man macros.