Gamestudio Links
Zorro Links
Newest Posts
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
Zorro tutorial ideas?
by AndrewAMD. 06/13/26 15:01
Zorro 3.01 recoded MMI function issue
by 11honza11. 06/13/26 11:40
Max Number of Strategies in /Strategy folder
by Martin_HH. 06/12/26 08:50
Stooq now requires an API key
by AndrewAMD. 06/11/26 17:55
Z9 getting Error 058
by k_ivan. 06/10/26 14:38
ZorroGPT
by TipmyPip. 06/10/26 13:07
Z12 live performance
by alx. 06/09/26 20:42
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 2,164 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 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: 28,101
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,101
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 | 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