Welcome, Guest. Please login or register.

Author Topic: Fonts, fonts, fonts  (Read 3610 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Thomas

Re: Fonts, fonts, fonts
« on: January 31, 2017, 09:58:42 AM »
With intuition.library you can use IntuiText->ITextFont->ta_YSize to get the height and IntuiTextLength() to get the width of the text.

With graphics.library cou'd get the height from RastPort->TxHeight and the width with TextLength(rp,text,length). Or use TextExtent() to get more detailed information.

The screen font can be read from Screen->Font (struct TextAttr) or Screen->RastPort.Font (struct TextFont).

The system font is available in GfxBase->DefaultFont or in RastPort->Font after a call to InitRastPort().