New games every week!
JSE - Text Alignment Tweak
27th May 2021  
The Text Alignment bug has been tweaked a little bit.


Now, when drawn at 0 degrees, things seem to work much better.

This is in Chrome, where previously it was halfway up the alignment test and having it's own little tea-party.
It's still ever so slightly out, by roughly a pixel, on the horizontal. The quick test doohickey doesn't appear to be showing that up. Not sure why.
I think it's to do with drawing the font centred. I think the different browsers must use different "middle of the letter", horizontally, too. Grrr.
I *did* give it a horizontal check, but it seems to be ignoring it for some odd reason.
Go figure.

Unfortunately, when rotated, all hell breaks loose!!
No idea how to fix that one.
Scaling and Rotation and Offsets, all together = chaos.
If you're rotating the fonts, for now, don't expect perfection!

// Alignment Test // by Jayenkai // Created 2021/5/22 Symbol 0,"0__P_0!PP0!PP0!PP0!PP0!PP0!P_"; Symbol 1,"2__0_0,4@0_0_0.4_4,0_0_4_4/0_0!4_4_0_0.4_4_440_004_4_4.0_4_4_4!0/4_4_4@0?4_4_4_40.4_4_4_40,4_4_4_4,004_4_4_4,04_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4_4.04_4_4_4,004_4_4_4,0,4_4_4_40.4_4_4_40?4_4_4@0/4_4_4!0_4_4_4.0_004_4_440_0.4_4_0_0!4_4/0_0_4_4,0_0_0.4@"; AA Off Graphics 64,64,1 repeat ResetDraw CLS 0,0,128 SetCol 255,255,0 SetFont 1 SetFontSize 8 dx=32:dy=32 rect dx,dy,24,8,1 Rect dx,dy,8,24,1 SetCol 255,0,0 SetSize 0.25 DrawImg dx-8,dy-8,0 DrawImg dx+8,dy+8,0 DrawImg dx+8,dy-8,1 DrawImg dx-8,dy+8,1 SetSize 1 SetFontSize 8 SetCol 100,200,255,1 Text dx,dy,Chr(127),1 SetCol 100,255,100,0.8 //SetRot 90 //Text dx,dy,Chr(127),1 //SetRot Mills()/100 //Text dx,dy,Chr(127)+Chr(127),1 flip forever

Views 52, Upvotes 1
Jse , Alignment
New games every week!
Site credits : Site built from the ground up, in php, using Programmer's Notepad 2, and a very bored Jayenkai.
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - JSE - Text Alignment Tweak - AGameAWeek