|
Post by johnno56 on Jun 6, 2023 22:22:12 GMT -6
My issue with Fonts this time is purely cosmetic... and yes, it may very well be the differences between Windows and Linux fonts... I have the MS core fonts installed... I am familiar with the loading, applying and displaying of fonts when it comes to "Drawing" text on the screen... My issue involves programs that use 'locate x,y: prints("text")'. The font that is set for print pure text on the screen seems to be vertically squashed. This probably caused by RC using the system's default font... I could be wrong... I am converting a simple (well... maybe no so simple...) game of Yahtzee from QB64 to RC. Both use the locate command. Both use the print command. However, RC sends the output to the console using a default font setup by RC?. But using prints(), to output to the screen, uses a different font. The attached screen is of 640x480px (80 chars x 25 lines). As you can see, the 'prints()' font is quite small. This is how it is supposed to look like... What fonts does RC use as 'default' for console print and prints() printing and how do I setup the correct Windows fonts for both? Of course, I can always use the standard methods of 'Drawing Text' to the screen, but I would like to avoid have to convert every 'locate' reference to a 'DrawText()' - I know... totally lazy... I would prefer to change the 'defaults' before going down that path... lol
|
|
|
Post by n00b on Jun 6, 2023 22:35:11 GMT -6
PrintS() uses a bitmap font that is built-in to the SDL_gfx library. It was meant to be used for debugging purposes but should never be used in an actual application.
Instead of changing every reference to print and locate, why don't you just make your own substitute commands and use those. Your locate just needs to change the xy position that your print command will start drawing at.
|
|
|
Post by johnno56 on Jun 6, 2023 22:58:31 GMT -6
hmm... Never? *sigh* ... Well, so much for being lazy... lol It was worth a shot... text drawing it is then... thanks for the tip... Have a great day!
|
|
|
Post by johnno56 on Jun 7, 2023 14:10:00 GMT -6
Well... Drawing of the text worked like a charm... perhaps a better choice of font would have made it look nicer - but that is the only upside to the program... In my haste to produce a Yahtzee game, and after spending some hours refining the "look" of the game, there was one 'tiny' procedure that I usually do 'first' before starting a conversion, but in this case 'did not', was to search for the dreaded "GOTO" commands... Sometimes I can create a 'work-a-round' but in most cases I cannot then move on to another project... This game was riddled with GOTO's... eg: Whilst within a Select Case... goto outside the select case and several goto's within sub routines...
I can recall a few, well a lot actually, of choice colourful metaphors that I would like to direct at the creator of Microsoft Basic, but because of my religious beliefs and that this is a public Forum and my attitude towards MS (Why should I bother, they're not worth it) I will refrain from such language and quietly move onto another project...
My apologies, n00b, for wasting your time in assisting myself. Your help was and is always appreciated.
How about a nice game of Pong? Forget Pong! Fire up the coffee machine!
|
|
|
Post by n00b on Jun 8, 2023 0:03:01 GMT -6
Its going to be pretty hard to translate most old BASIC programs to any modern language. You would be better off remaking the entire program from scratch.
|
|
|
Post by johnno56 on Jun 8, 2023 2:38:46 GMT -6
NOOOOoooo....that implies 'creative thinking'... two words that strike absolute terror when designing games... *sigh* Pong is starting to look real good... lol I need more coffee....
|
|