Project

General

Profile

Actions

Bug #552

open

Font scaling on bitmapped (Amiga) fonts not working properly.

Added by Brian Flanagan about 4 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Target version:
-
Start date:
10/22/2020
Due date:
% Done:

0%

Estimated time:
1:00 h
Affected version:

Description

When the size is too much smaller than the original bitmap, the characters are too far apart horizontally.
When the size is too much larger than the original bitmap, the characters are too close together horizontally.

Example:

#manifest: "aoz"

#amigaFont: "news" ' 23
#amigaFont: "2001" ' 8
#amigaFont: "ammolite" ' 10
#amigaFont: "courier" ' 11,13,15,18,24
#amigaFont: "garnet" ' 9,16
#amigaFont: "mFast" ' 20
#amigaFont: "peridot" ' 7
#amigaFont: "times" ' 11,13,15,18,24
#amigaFont: "arial" ' 11,12,13,15,16,20,25,30,35,40
#amigaFont: "diamond" ' 12, 20
#amigaFont: "helvetica" ' 9,11,13,15,18,24
#amigaFont: "onyx" ' 9
#amigaFont: "ruby" ' 8,12,15
#amigaFont: "topaz" ' 11
#amigaFont: "pica" ' 32
#amigaFont: "broadway" ' 16
#amigaFont: "emerald" ' 17,20
#amigaFont: "lines" ' 21
#amigaFont: "opal" ' 9,12
#amigaFont: "sapphire" ' 14,19

Screen Open 0,1280,720,32,Lowres
Palette 0,$FFFFFF
Ink 1
Cls 0 : Curs Off : Flash Off
Data "helvetica","emerald","lines","sapphire","news","2001","ammolite","garnet","peridot","onyx"
Data "pica","broadway","opal","news","courier","mFast","times","arial","diamond","ruby","topaz"

f=20 ' read 20 Amiga fonts
Dim f$(f)
For fnt=0 to f-1
    Read f$(fnt)
Next fnt

gap = 2
fnt = 0
skip = 34

Do
    For fontHeight=8 to 48 step 4
        cls 0
        Locate 0,0 : Print "Font: "+f$(fnt)+Str$(fontHeight)+"px"
        Set Font f$(fnt),fontHeight
        startAt=fontHeight+gap+skip
        Text 0,startAt,                         "Font: "+f$(fnt)+Str$(fontHeight)+"px"
        Text 0,startAt+fontHeight+gap,          "In the beginning, God"
        Text 0,startAt+(fontHeight+gap)*2,      "created the heavens"
        Text 0,startAt+(fontHeight+gap)*3,      "and the earth."
        Wait Key : Repeat Until Inkey$=""
    Next fontHeight
    Inc fnt : If fnt=f Then fnt=0
Loop
Actions

Also available in: Atom PDF