5 import gfxprim
.core
as core
6 import gfxprim
.gfx
as gfx
7 import gfxprim
.backends
as backends
8 import gfxprim
.input as input
9 import gfxprim
.text
as text
14 black
= c
.RGBToPixel(0, 0, 0)
15 white
= c
.RGBToPixel(0xff, 0xff, 0xff)
19 align
= text
.C
.ALIGN_CENTER | text
.C
.VALIGN_CENTER
20 style
= text
.TextStyle(text
.DefaultProportionalFont
, 0, 0, 1, 1, 1)
26 y
+= text
.TextHeight(style
) + spacing
27 c
.text
.Text(style
, c
.w
//2, y
, align
, white
, black
, "Lorem Ipsum Dolor Sit Amet.")
29 style
.pixel_xspace
+= 1
30 style
.pixel_yspace
+= 1
39 win
= backends
.BackendX11Init(None, 0, 0, 800, 600, "Fonts", 0)
48 if (ev
.type == input.EV_KEY
and ev
.val
.val
== input.KEY_ESC
):
50 elif (ev
.type == input.EV_SYS
):
51 if (ev
.code
== input.EV_SYS_QUIT
):
53 if (ev
.code
== input.EV_SYS_RESIZE
):
57 if __name__
== '__main__':