Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
wwrap flag separates words and punctuation #240053
12/09/08 01:54
12/09/08 01:54
Joined: Feb 2002
Posts: 357
Florida
Zelek Offline OP
Senior Member
Zelek  Offline OP
Senior Member

Joined: Feb 2002
Posts: 357
Florida
When wwrap is enabled for a text, if the last character that doesn't fit is a punctuation mark (period, comma, etc), it will be moved to the next line apart from the word that precedes it. This doesn't seem to be correct wwrap behavior. You get texts like this:
Quote:
This is a test string
.


Full source code:
Code:
#include <acknex.h>
#include <default.c>

FONT* arial_font_24_b = "Arial#24b";

TEXT* test_txt = {
   string ("this is a test string;");
   font = arial_font_24_b;
   size_x = 180;
   flags = WWRAP | VISIBLE;
}

function main() {
   level_load("TestProject.wmb");
}


Re: wwrap flag separates words and punctuation [Re: Zelek] #240080
12/09/08 10:53
12/09/08 10:53
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, that's true. However the Truetype font functions, including word wrap, are provided by Windows - so I believe there's nothing we could do about it. For getting a different result, you could split and wrap the text yourself.

Re: wwrap flag separates words and punctuation [Re: jcl] #240107
12/09/08 14:24
12/09/08 14:24
Joined: Feb 2002
Posts: 357
Florida
Zelek Offline OP
Senior Member
Zelek  Offline OP
Senior Member

Joined: Feb 2002
Posts: 357
Florida
That's really unfortunate. I was hoping to rely on this new flag for a large number of dynamically constructed strings in my text objects. I'd rather not spend time writing my own word-wrap functionality, if possible.

I haven't seen word-wrap behave this way anywhere else in Windows. Keeping the punctuation with the preceding word seemed like standard behavior. frown


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1