Previous Thread
Next Thread
Print Thread
GDI white text #1177 03 Jun 16 09:26 AM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Is it possible to print two words inside the same black circle using different fonts, like the country name and size in this label ?

I tried to print each word in independent circles but, the last printed circle overrides the first one, using a sentence with CRLF between the two words has the problem of changing font, any tip? confused


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: GDI white text #1178 03 Jun 16 10:52 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
You mean like this:

[Linked Image]

Code
//;Print multiple independent white strings in one black circle
//SETMAPMODE,LOENGLISH
//ELLIPSE,100,100,200,200,BLACK_BRUSH
//SETTEXTCOLOR,255,255,255
//SETFONT,200,ARIAL,DEFAULT_PITCH,ANSI_CHARSET,FW_LIGHT
//TEXTCENTER,100,120,200,135,"US"
//SETFONT,320,ARIAL,DEFAULT_PITCH,ANSI_CHARSET,FW_HEAVY
//TEXTCENTER,100,145,200,175,"9.5"

Re: GDI white text #1179 03 Jun 16 11:30 AM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Wow!! That's exactly that.
It's good to know that it's possible because, I use an SBX that prints labels based in structured settings written in external config files so, this means that something is missing while interpreting those settings that I must fix.
Thank you very much


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: GDI white text #1180 03 Jun 16 12:15 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
The key here is that the color specified in the //SETTEXTALIGN should act as "paint" (rather than "ink"). (And unlike real-world paint, this kind of paint covers perfectly, even white on top of black.)

So it's just a matter of outputting the background first, and then writing on top of it.

Note that for positioning your text, you probably want to set the //TEXTCENTER rectangle height to zero and use //SETTEXTALIGN to bottom align the upper string ("US") and top align the bottom string ("9.5")

Re: GDI white text #1181 03 Jun 16 02:37 PM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Thanks for the addttional tips, precious!
The issue was very intrinsic to the SBX logic to interpret the settings but, in resume, I have configured the label in a way that, the SBX was drawing two circles each with one of the two words inside of it but, the second was on top of the first circle so, hidding the first word.
After seeing your example, I changed it to, first draw one single circle and, in sequence, write each of the two words, simple as that! wink

Thank you very much


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal

Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3