Seite 1 von 1

Schriftart ändern

Verfasst: 24.04.2005 22:36
von Mike0484
Guten aben,
wie ändere ich in einem Screen die Schriftart bzw. wie bekomme ich die Schrift größer ? Hab es mit Loadfont und Drawingfont probiert aber die Schrift bleibt immer gleich
Fileicht setze ich die befehle auch nur falsch ein, kann mir da jemand ein beispiel zeigen ?
Damke im foraus

Verfasst: 25.04.2005 00:11
von Hroudtwolf
Bitte schön..... Nur für dich. :wink:

Code: Alles auswählen

;Hroudtwolfs Font Example
;2005
If InitSprite() = 0 Or InitKeyboard() = 0
  MessageRequester("Error", "Can't initale DirectX 7 or later", 0)
  End
EndIf

LoadFont(1,"Arial",10,#PB_Font_Bold)
LoadFont(2,"Tahoma",20,#PB_Font_Bold)
LoadFont(3,"Verdana",24,#PB_Font_Bold)
LoadFont(4,"Verdana",24,#PB_Font_Bold|#PB_Font_Italic)


If OpenScreen(800, 600, 16, "Hroudtwolfs Font Example")




  Repeat
    
    FlipBuffers()
    
    ClearScreen(0,0,0)
      If StartDrawing(ScreenOutput())
      DrawingMode(1)
         FrontColor(255, 0, 0)
         DrawingFont(UseFont(1))
         Locate (10,10)
         DrawText ("This is a Test !")
         FrontColor(200, 200, 0)
         DrawingFont(UseFont(2))
         Locate (10,30)
         DrawText ("This is a Test !")
         FrontColor(255, 0,255)
         DrawingFont(UseFont(3))
         Locate (10,80)
         DrawText ("This is a Test !")
         FrontColor(0, 255, 0)
         DrawingFont(UseFont(4))
         Locate (10,130)
         DrawText ("This is a Test !")
    StopDrawing()
  EndIf

    ExamineKeyboard()
  Until  KeyboardPushed(#PB_Key_Escape)
  

EndIf

End   


Verfasst: 25.04.2005 02:11
von Mike0484
Dankeschön
Mein fehler war stat DrawingFont(UseFont(1))
habe ich nur DrawingFont(1) geschrieben <)