textsize(3f) - [M_draw:TEXT] Set text size of a character in the current SOFTWARE font in world units. (LICENSE:PD)
Synopsis
Description
Examples
subroutine textsize(width, height)
real,intent(in) :: width real,intent(in) :: height
Set the maximum size of a character in the current font. Width and height are values in world units. This applies to software text, but may not apply to hardware fonts depending upon the output device. This must be done after the font being scaled is loaded. To keep text of different sizes aligned along the same baseline not that you typically need to subtract the descender height from the Y position
Sample program:
program demo_textsize use M_draw implicit none integer :: i,ii integer :: ipaws !! set up long bar as plotting area call prefsize(900,150) call vinit( ) ! start graphics using device $M_DRAW_DEVICE call ortho2(-30.0, 30.0, -5.0, 5.0) call font(times.r)call move2(-23.0,-4.5) call color(D_WHITE) 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(D_MAGENTA) call drawstr(aA) enddo
ipaws=getkey()
call vexit()
end program demo_textsize
Nemo Release 3.1 | textsize (3) | February 23, 2025 |