Text() and ViewPort() bug?
Blitz3D Forums/Blitz3D Programming/Text() and ViewPort() bug?
| ||
| Hi, I was playing a little with the Text() command and discovered something wierd. If I create a boundary on the right side with Viewport, and use a loaded font(Arial), and the textstring includes non-english characters, the clipping doesn´t quite work properly. Sometimes it can´t print non-complete letters. Is this a known bug? Or did I just "get lucky"? ;) |
| ||
| Ok, I assume that noone understood what I´m taking about. ;) So how about if I post some code for you to test. Use the left and right arrows to see the "disappering letter" bug. Graphics 350,180,32,2
SetBuffer BackBuffer()
font=LoadFont("Arial",14,False,False,False)
SetFont font
tx=40
Repeat
If KeyHit(203) Then tx=tx-5 ;left
If KeyHit(205) Then tx=tx+5 ;Right
Viewport 44,36,205,40
Color 0,0,200
Rect 44,36,205,40,1
Color 255,255,255
Text tx,40,"Alittetextstringthatcontainssomeletterthatiså;äandöandalsosomeüandÅagainandafterthatsomstandardenlishcharacters"
Text tx,52,"Alittetextstringthatcontainssomeletterthatisonlystandartenglishlettagainandafterthatsomstandardenlishcharacters"
Viewport 0,0,GraphicsWidth(),GraphicsHeight()
Flip
Until KeyHit(1)
FreeFont font
EndIs there anything that can be done about this? And still be able to use the Text command? |