Can I use ✔️ in [objectives]?

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
serclino
Posts: 40
Joined: May 18th, 2018, 9:54 pm

Can I use ✔️ in [objectives]?

Post by serclino »

Hi,

I want to tag done objectives with this special character: ✔️
But before release of my campaign, I'm wonder if the other players will see it?
I'm coding on MacOS.

Example:

Code: Select all

[objectives]
	[objective]
		description= _ "<span color='#BCB088'>Escape wolves</span>✓"
		condition=win
	[/objective]
[/objectives]					
Thank you :)
User avatar
HonzaCZ
Posts: 38
Joined: August 7th, 2018, 2:23 pm
Location: doin your mom

Re: Can I use ✔️ in [objectives]?

Post by HonzaCZ »

yes
User avatar
WhiteWolf
Forum Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Can I use ✔️ in [objectives]?

Post by WhiteWolf »

It should work, but it depends on the sign itself. I used a tick sign in one of my campaigns too, and it worked fine on my Linux system, but Windows users reported that they see the blank missing-character-box instead.
I don't know which symbol is recognized by all systems, but the bold one in the first line of this text certainly isn't. I guess the safest bet is to just use something like (done), with a unique color, instead of a dedicated check mark.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
serclino
Posts: 40
Joined: May 18th, 2018, 9:54 pm

Re: Can I use ✔️ in [objectives]?

Post by serclino »

RIght, finally I decided to use: (done)
Thx :)
User avatar
Elvish_Hunter
Posts: 1575
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: Can I use ✔️ in [objectives]?

Post by Elvish_Hunter »

WhiteWolf wrote: August 1st, 2020, 12:07 pm It should work, but it depends on the sign itself. I used a tick sign in one of my campaigns too, and it worked fine on my Linux system, but Windows users reported that they see the blank missing-character-box instead.
I did some investigations, and this actually sounds like a bug.
It looks like the expected behavior should be to use the glyphs available in the Lato Regular font first, and if the required glyph isn't available fall back on the DejaVu Sans font. For some reason, this works correctly on Linux, but not on Windows.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
gnombat
Posts: 684
Joined: June 10th, 2010, 8:49 pm

Re: Can I use ✔️ in [objectives]?

Post by gnombat »

Elvish_Hunter wrote: August 3rd, 2020, 7:37 pm I did some investigations, and this actually sounds like a bug.
It looks like the expected behavior should be to use the glyphs available in the Lato Regular font first, and if the required glyph isn't available fall back on the DejaVu Sans font. For some reason, this works correctly on Linux, but not on Windows.
There are some bug reports that may be relevant: #5007 #1549

I tried testing some check mark characters (⍻ ☑ ✅ ✓ ✔ 🗸 🗹 ✔️ ☑️) on Windows 10 in Wesnoth 1.14.13, Wesnoth 1.15.3, and the use_fontconfig branch:

Wesnoth 1.14.13
Wesnoth 1.14.13
1.14.13.png (21.97 KiB) Viewed 888 times
Wesnoth 1.15.3
Wesnoth 1.15.3
1.15.3.png (22.3 KiB) Viewed 888 times
use_fontconfig branch
use_fontconfig branch
use_fontconfig.png (21.82 KiB) Viewed 888 times
So, if you're writing an add-on which is targeting Wesnoth 1.15/1.16, you might be able to use check mark characters.
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Can I use ✔️ in [objectives]?

Post by Iris »

It would be interesting to see what the technical difference between vanilla 1.14.13 and 1.15.3 is. Different Pango/Cairo versions maybe?
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Post Reply