Code: Alles auswählen
LoadFont(#Font_Bold2, "Arial", ((xpos / 1024) *128), #PB_Font_Bold) ; ziemlich grosssss...
Code: Alles auswählen
LoadFont(#Font_Bold2, "Arial", ((xpos / 1024) *128), #PB_Font_Bold) ; ziemlich grosssss...
kein Wunder:dysti hat geschrieben:Das funktioniert nicht:
Code: Alles auswählen
YSize = ((xpos / 1024) *128)
Debug YSize
LoadFont(#Font_Bold2, "Arial", YSize, #PB_Font_Bold) ; ziemlich grosssss...
Wieso funktioniert das nicht ?dysti hat geschrieben:Das funktioniert nicht:Code: Alles auswählen
LoadFont(#Font_Bold2, "Arial", ((xpos / 1024) *128), #PB_Font_Bold) ; ziemlich grosssss...
Code: Alles auswählen
Enumeration
#Window
#Gadget
#Font_Normal
#Font_Bold
#Font_Bold2
EndEnumeration
;OpenWindow(#Window, 0, 0, 800, 600, "WindowTitle", #PB_Window_MinimizeGadget|#PB_Window_ScreenCentered)
;CanvasGadget(#Gadget, 0, 0, WindowWidth(#Window), WindowHeight(#Window))
Define X.i = 10, Y.i = 10
; If StartDrawing(CanvasOutput(#Gadget))
PrintRequester()
StartPrinting("test")
ypos = PrinterPageWidth() ; 7016
xpos = PrinterPageHeight() ; 4958
LoadFont(#Font_Normal, "Arial",((xpos / 1024) * 12))
LoadFont(#Font_Bold, "Arial",(xpos / 1024) * 24, #PB_Font_Bold)
Y=(ypos / 460) * 24
If StartDrawing(PrinterOutput())
DrawingMode(#PB_2DDrawing_Transparent)
FrontColor($000000)
DrawingFont(FontID(#Font_Normal))
DrawText(X, Y-TextHeight(" ")*0.8, "Dieser Satzteil ist normal, ")
X + TextWidth("Dieser Satzteil ist normal, ")
DrawingFont(FontID(#Font_Bold))
DrawText(X, Y-TextHeight(" ")*0.8, "dieser Satzteil ist fettgedruck")
X + TextWidth("dieser Satzteil ist fettgedruck")
DrawingFont(FontID(#Font_Normal))
DrawText(X, Y-TextHeight(" ")*0.8, ", das ist nun wieder normal.")
StopDrawing()
StopPrinting()
EndIf
;Repeat
; Select WaitWindowEvent()
; Case #PB_Event_CloseWindow
; End
; EndSelect
;ForEver