C Library Functions - textsize (3)
NAME
textsize(3f) - [M_pixel:TEXT] set text size in world units
(LICENSE:PD)
CONTENTS
Synopsis
Description
Examples
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.
EXAMPLES
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) | June 29, 2025 |
Generated by manServer 1.08 from 0e578f30-3e41-4c5b-a157-760f1f238c5f using man macros.