Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Screen 13 small fonts
#1
is it possible to use screen 13 for small fonts, what is the code, please?? Smile
Reply
#2
How small?
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#3
well....i don't have code, but i do have a method.

it would be easiest to use PP256 (search around and you'll find it), and create your own font.....then use PUT (posx, posy) for each char....

oz~
Reply
#4
thank you, oz Big Grin
Reply
#5
thank you, oz Big Grin
Reply
#6
Or you could use my generic font editor, if you don't need the font to have multiple colors. It can import Win3.x .fon files. It comes with a few, as well as sample fonts (and sample code to draw them) of other formats:
FontEdit20.zip
Reply
#7
the problem with screen 13 is that each pixel is too big, its hard to make a small font for screen 13, i tried, but if u have any luck can i use it too
Reply
#8
How do you change the font fb uses as it's default, then there would be no need for PP256.
Reply
#9
FB has nothing to do with the font used. The generic windows/dos console uses that font, and there is no way to change that.
quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Reply
#10
Torahteen: He's speaking about Screen 13, not console.
At the moment, FB does not provide a way to change fonts.

Some years ago, Biskbart used this 5x4 font and print routine in his demos:
Code:
'5x4 font for screen 13, by Biskbart. QB version
'
declare SUB PrintC (X%, Y%, Texte$, Couleur%, Segment&, Offset&)
screen 13
dim shared xmax&,ymax&
xmax&=320:ymax&=200
DIM SHARED Police%(0 TO 62)
printc 10,10,"5,4,3,2,1, Hello, world!, ABCDEFGHIJKLMN",15,&ha000,0&
sleep
'
'-----------------------------------------------------------------------
Data.Police:
'Font 5x4 defined by 5 octal digits bottom line (msd) to top line (lsd)
'Implemented Chr 32 to chr 96, only caps
'
'    SP   1   "      #     $     %    &      '    (     )      *    +
DATA 0,08338,00045,24445,32223,21157,15018,00018,08778,10530,02728,01488
'      ,     -     .     /     0     1     2    3     4     5     6
DATA 05120,00448,08192,05268,11114,18740,29351,31143,18926,31183,31695
'      7     8     9     :     ;     <     =     >     ?     @     A
DATA 04775,10922,31215,01040,05136,17492,03640,05393,08615,29695,23535
'      B     C     D     E     F    G      H     I     J     K     L
DATA 15083,29263,15211,29391,04815,31311,23533,09362,11044,23277,29257
'      M     N     O     P     Q    R      S     T     U     V     W
DATA 23421,24573,11114,05103,15215,22511,31183,09367,31597,11117,24429
'      X     Y     Z     [     \    ]    ^
DATA 23213,09389,29351,29263,17553,31015,&o52
'
'------------------------------------------------------------------------
SUB PrintC (X%, Y%, Texte$, Couleur%, Segment&, Offset&)
if police%(1)=0 then  
  RESTORE Data.Police
  FOR I% = 0 TO 62: READ Police%(I%): NEXT I%
end if
DEF SEG = Segment&
   P1&=Offset&+ 320&*Y%+x%
   texte$=ucase$(texte$)
   FOR I% = 1 TO LEN(Texte$)
    P2% = police%(ASC(MID$(Texte$, I%, 1)) - 32)
    P&=p1&
    FOR J% = 0 TO 4
     FOR K% = 0 TO 2
      ' A optimiser que diable !!!
      IF &H1 AND P2% THEN POKE p&+ K%, Couleur%
      P2% = P2% \ 2
     NEXT K%
     p&=p&+320
    NEXT J%
    p1&=p1&+4
  NEXT I%
end sub
BTW: Police is Font in french! Big Grin
Antoni
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)