Page 1 of 1

Fixed width fonts

Posted: Sat Nov 23, 2024 8:33 pm
by phipslk
Is it possible to tell FontRequest() only show fixed witdth fonts?

Re: Fixed width fonts

Posted: Sat Nov 23, 2024 8:48 pm
by plouf
no

but maybe, as a workaround, you can compare FontWidth("IJ1") with FontWidth("OWM") to see if it equal ?

Re: Fixed width fonts

Posted: Sun Nov 24, 2024 4:25 pm
by jPV
I think this uses a font requester from the operating system underneath. For example, the font requester in MorphOS does have an option to show only Fixed Width fonts (or bitmap fonts or unicode fonts etc.). So FontRequest() with Hollywood on MorphOS does have this option already.

Re: Fixed width fonts

Posted: Mon Nov 25, 2024 7:42 pm
by phipslk
plouf wrote: Sat Nov 23, 2024 8:48 pm but maybe, as a workaround, you can compare FontWidth("IJ1") with FontWidth("OWM") to see if it equal ?
that would be a nice command, FontWidth(). I take dimensions of a TextObject with the letter and GetAttribute() for size measuring

Re: Fixed width fonts

Posted: Mon Nov 25, 2024 7:43 pm
by phipslk
jPV wrote: Sun Nov 24, 2024 4:25 pm I think this uses a font requester from the operating system underneath. For example, the font requester in MorphOS does have an option to show only Fixed Width fonts (or bitmap fonts or unicode fonts etc.). So FontRequest() with Hollywood on MorphOS does have this option already.
I think on AmigaOS 3.x this is an option too. But I can't set it as default via Hollywood.

Re: Fixed width fonts

Posted: Sat Nov 30, 2024 10:40 pm
by airsoftsoftwair
phipslk wrote: Mon Nov 25, 2024 7:42 pm that would be a nice command, FontWidth(). I take dimensions of a TextObject with the letter and GetAttribute() for size measuring
No need to create a text object, just use TextWidth() or TextExtent().