News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

How important is unicode

Started by sinsi, January 15, 2019, 06:48:57 PM

Previous topic - Next topic

aw27

@daydreamer
Good point. The Unicode points for the flags exist, what is more difficult is finding a font to render them. For Windows you need the BabelStone Flags Font.
I installed it and tested in Word and works like a charm.

To make a program to render in color you need DirectWrite. I made a program sometime ago, which is in the Games forum, to render emojis that can be easily adapted to render color flags.

jj2007

The DirectX thread is here: http://masm32.com/board/index.php?topic=7480.0

aw27



daydreamer

Quote from: AW on January 18, 2019, 08:55:31 PM
Thank you JJ.


nice flags
doesnt latest richedit support not only unicode but colors too in winapi textarea?MS word you can have different colors in textarea,so probably possible with flags too

but to make use of majhong pieces would be the harder,because you need to sort them before drawing them,because they are ontop of each other in the game


my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

aw27

Richedit: From what I read it is only possible to render unicode color characters in the windowless control. However, I was not able to do it in some tests performed at the time. It is possible to render to the canvas by subclassing but is not the same thing.
Microsoft makes life very hard for developers in the areas they do business, including technologies related to word processing. Things were not like that when Microsoft was only the operating system.

TBRANSO1

Quote from: jj2007 on January 16, 2019, 05:44:13 AM
print "Вы никогда не должны кормить Хосе Паскоа"

Sorry, I don't know anything to add to the conversation...

This is funny... I am not sure if AW knows Russian, but I do... I am not going to "feed"...., but this is funny.

BTW, are you Russian?  If so, why do you have an Italian map?

jj2007

Quote from: TBRANSO1 on January 20, 2019, 03:51:22 AMbut this is funny.

Glad you liked it :P

QuoteBTW, are you Russian?  If so, why do you have an Italian map?

I am German, but I live in Italy. And Russian is a charset that works for the console of many OS versions, in contrast to e.g. Chinese or Arabic. Therefore I use it often to demonstrate Unicode-related features.

Where are you from? I used to speak some Russian many years ago, nowadays I have to rely on DeepL.

TBRANSO1

Quote from: jj2007 on January 20, 2019, 04:25:00 AM
Where are you from? I used to speak some Russian many years ago, nowadays I have to rely on DeepL.

Aha, no, I once played a Russian linguist - intelligence expert for the US ARMY and Gov.  I'm from Arizona.  After I got away from the swamp in DC, I have played businessman.  Now, I am playing a programmer.  I sort of miss the work I did back then, and lament the relationship between the US and Russia due to policy blunders for the past two decades... one of the reasons I left.


hutch--

Escaping the swamp in DC sounds like a good move. The deterioration in relations between the US and Russia is very unfortunate as both countries have something to gain by simply trading with each other. Too many fingers in the pie in DC seems to be the problem.

daydreamer

@TBRANSO1
good you got outta the swamp


Quote from: AW on January 18, 2019, 08:55:31 PM
Thank you JJ.


I got an idea,after checking your dx thread again about emoji and about flags and game unicode,lets all install all game useful unicode sets and for example this could be my character in game,made by unicode characters ontop of each other
king emoji
swedish flag(t-shirt)
blue jeans
blue swede shoes
so how does your character look like?
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

TBRANSO1

Quote from: hutch-- on January 20, 2019, 07:40:51 AM
Escaping the swamp in DC sounds like a good move. The deterioration in relations between the US and Russia is very unfortunate as both countries have something to gain by simply trading with each other. Too many fingers in the pie in DC seems to be the problem.

Yep

It's beautiful in the area, BUT comes with a price.

OT:
Those Russians are brilliant in science, math and logic... definitely.  It was explained by a professor that a good proportion of the algorithms that Knuth is famous for have roots to the Russians in computer science.  That when archives were dug up after the fall of the "Empire", that a lot of those scientific journals and notes were discovered, and although the Russians were underfunded, embargoed, blockaded, there is a lot of work that we can actually now credit to Russians rather than Americans.  That while discoveries were credited by others in the US, Germany, Netherlands or the UK, but it's good to give credit where it is due.

I have a real life experience of some chemists in a forum around '93 or so, where I was a translator, that they were tasked to solve some equation that looked like squiggly lines to me, and the Americans whipped out their TI's, and the Russians solved the equation with pen and pencil faster.  "Impressive, very Impressive!" as Darth Vader would say.

aw27

Quote
I got an idea,after checking your dx thread again about emoji and about flags and game unicode,lets all install all game useful unicode sets and for example this could be my character in game,made by unicode characters ontop of each other
king emoji
swedish flag(t-shirt)
blue jeans
blue swede shoes
so how does your character look like?

Under Windows, Color Flags are truly on the leading edge of Unicode. The technology is not yet stable. As you can read from the http://www.babelstone.co.uk/Fonts/Flags.html article on the Edge and IR11 browsers Country Subdivision Codes are not rendered as flags. They are rendered like this.

On the other hand while Word 2016 displays all color flags it does not do it smoothly, the font tends to reset to Calibri when we paste a flag character.

DirectWrite will not display the Country Subdivision Codes flags (at least I could not make it work).
For instance the symbol for Belgium: Brussels-Capital Region (FR-BRU) is 7 UTF32 characters and is properly converted to 14 UTF16 characters by MultiByteToWideChar. However it will only display as a generic black flag on a pole (the same symbol that Notepad displays when I select the BabelStone Flags font and paste the character).

There are other shortcomings such as, in monochrome, flags not being displayed as real flags, etc.

TimoVJL

Finally Windows 10 supports loading local font for DirectDraw with AddFontResourceEx / RemoveFontResourceEx.
Window 7 needs FontFileLoader implementation for that and that same code don't work with 8.1 and 10 :(
An example needs BabelStoneFlags.ttf to same folder.
May the source be with you