chinese font in flash - actionscript-3

I have a site with some swf file.
I have to translate all site in chinese, and when I have opened my flash project copy into a textfield (with font trebuchet) the text in chinese.
I have compiled and seen into many computers: Windows7 Windows Xp and Mac.
I'm very surprised because I seen the chinese character correctly but I have only copy the text I don't include any characters or font. Is possible this? For me is very simple now but I don't want that in a pc I don't see character because I have to include chinese font. But now is working and I see correctly. Why this? Is corret to don't include chinese font?

It looks like most modern systems will have support:
http://en.wikipedia.org/wiki/List_of_CJK_fonts
You'd lose in filesize by embedding a font but gain some extra control on the font smoothing and ability to rotate the font, but it looks like you'd be safe not embedding assuming you're targeting mostly customers that have moved up to or beyond XP service pack 3.

Related

Font Awesome does not work on any of my Windows 10 computers

I cannot get Font Awesome to work on any of my three Windows 10 machines. All my computers have been updated from 8.1. I don't know when it stopped working, here is what I do know:
Symptoms:
The font does not show. When double-clicked and opened with default Windows font viewer, it shows a default Arial-like typeface instead of slab serif Font Awesome
After installation, when browsed with Character Map - it again displays some kind of system-default font (and none of the icons)
Opened in Adobe programs it shows all alphanumeric characters and icons as blank square outlines.
So far I have tried:
Removing any and all font awesome files from the system and installing the font again
Installing just OTF, just TTF as well as both
Restarting, rebooting, system cleanup
Downloading older versions of the font
I am new to StackOverlow, so can't post images. Links below:
Double-clicking FontAwesome.otf file
Attempting to view in Character Map
EDIT: I had a friend with Windows 8.1 try it -- same problem!
One practical way is to convert .otf format to .ttf using Fontlab.
The solution is discussed here.
Font Awesome 5 is known to work on Windows 10. Here are instructions to install for Desktop Use. We recommend that you use the OTF files for desktop applications, because they support ligatures (i.e. type the icon name and the icon glyph appears).

Unicodes not rendering properly in mobile devices

I am having difficulty having geez texts like these
እቶም ዝቐለሉ ክፋል ናይቲ ቋንቋ እዮም፣ በዚ ኣብ ታሕቲ
to which you can find more information on wikipedia. Are not rendering at all on most mobile platforms.
I don't know what the causes are. I have declared the charset on my document as utf8
<meta charset="utf-8">
Is there some solution to showing these texts on mobiles like Nokia S60, or symbian phones running opera or their native browsers?
This is a font problem, nothing to do with encodings. The issue is that only few fonts contain glyphs for Ge’ez letters, and many devices have no such font installed.
Thus, the only practical option is to use a font as a web font (downloadable font) with #font-face. For general instructions, see my Guide to using special characters in HTML.
The following fonts have Ge’ez letters: Code2000 (an extensive font, which appears to be abandonware), FreeSerif (seems to have all wrong spacing for Ge’ez letters), GNU unifont (a coarse bitmap font), Nyala (shipped with new versions of Windows), SunExt-A, and TITUS Cyberbit Basic. This leaves about two options, the last two; TITUS Cyberbit Basic is announced as free for non-commercial use, and SunExt-A is free. Both are rather large, so there will be problems on slow connections. Both look reasonable to me, but I don’t really know Ge’ez.

Unicode character (hexagon) not displayed on some computers

I have a huge problem. I just updated my websites homepage to display a unicode hexagon character: ⬢ ⬢ aka U+2B22
I made it 200px big and filled it with text. It looks good and works fine on my computer. With both Internet Explorer (win8) and Firefox 28.
I tested it on 5 different computers and it didn't work there! Tested with Firefox 28 and Internet Explorer (win7) on each device and on one computer even with the newest Chrome.
So what am I doing wrong? How is it possible that it works on my FF 28 and on 5 different devices with FF 28 it doesn't?
I already tried:
<?php header('Content-Type: text/html; charset=utf-8'); ?>
and in HTML directly:
meta http-equiv="content-type" content="text/html; charset=utf-8"
Is U+2B22 not part of utf-8?
Try it yourself here, scroll to the very bottom of: http://jtauber.github.io/articles/css-hexagon.html
For my PC it looks like this: http://250kb.de/u/140401/j/RzN1lYTL8fLJ.jpg
On other devices it looks like this: http://250kb.de/u/140401/p/VEeerGhyv4lM.png
I appreciate any help!
The character U+2B22 BLACK HEXAGON is included in a few fonts only. None of those font comes with Windows or with other widely used software, so in most computers, there is no font containing it. Moreover, browsers may fail to render the character even if some font in the system has it. For some more general explanations, see my Guide to using special characters in HTML.
In this case, the font setting is font-family: "Helvetica Neue", Arial, Helvetica. None of those fonts contains the character, so each browser tries to use other fonts in the system, in a browser-dependent order. In your own computer, you have a font that contains the character. You may have downloaded and installed it, or it may have come along with some software
What you could do is, alternatively,
a) specify, in a font-family declaration, a list of fonts known to contain the character. This could help against problems of browsers not finding a font, but this would not matter much.
b) use a downloadable font (web font, via #font-face). This would mostly be overkill if you just want one character for essentially non-text use. Fonts that contain U+2B22 are generally large.
c) use an image instead, possibly as a background image. This would be here the rational choice, especially since you would not use U+2B22 as a character in text but as a background of a kind.
Regarding the question “Is U+2B22 not part of utf-8?”, characters aren’t really part of utf-8. Instead, utf-8 is a transfer encoding for characters, and all Unicode characters (and, moreover, all Unicode code points) have representations in utf−8. Besides, the page mentioned does not contain U+2B22 as such but as the character reference ⬢, and this works independently of character encodings. Thus, this is not an encoding problem, but a font issue.
These computers on which it does not work do not have a font installed which contains a glyph for this particular character. That is all.
Solutions would include to not depend on users having fonts with such unusual characters installed and provide them as web font instead (which you might have to create) or to use an image, SVG or canvas instead.

Chinese font on the web rendering differently in different browsers

I've been displaying Chinese fonts on my Chrome browser on my Mac and I liked it. However the font is rendered differently in Firefox or when I use Chrome on Windows. Is there a way to standardize the font that the browser chooses for Chinese characters?
You have various options:
As Art of FITZ says, specify an #font-face and have the font downloaded to the user (which will, indeed, take up a lot of bandwidth if the font is large)
As Jukka says, provide a list of font names in the font property and hope one of these is installed on the user's computer
The legacy method: render the text on your own computer in the font of your choice, upload this as an image file. If you don't have much text to display, this may be even more efficient than having an #font-face clause that downloads a multi-megabyte font file.
Tailor the #font-face to your needs: Depending on the amount of text to display, you may be able to create a font with only the subset of characters you need (with an online utility such as Font Squirrel), reducing the size of the font file to download.
Here is a quick reference to how this line of code is used.
http://www.css3.info/preview/web-fonts-with-font-face/
Different browsers have different default fonts, but can can override this by setting font-family in CSS. Just remember that different computers have different sets of fonts available, so you should normally use a list of fonts, hopefully covering most browsing situations.
Maybe you have done so but see different results on different browsers. Please post a relevant part of the code and/or a URL then.

AS3 - Chinese text and system fonts

If I set an input textfield to use a _sans system font, does it display Chinese characters?
Thanks.
Uli
The issue will be whether the system that is running your swf has a Chinese font installed.
_sans is the default 'sans serif' font installed on the system.
Typically PC's in China will ;), Mac's also have one installed by default.
This is a multi lingual presentation that pulls in text from an XML file. If I play this on my Mac and choose the Chinese option I see the font. If I run it on my UK based Windows XP machine it doesn't display the font. The swf specifies the _sans font for anything other than latin languages. So Russian also uses the _sans font.
http://www.sita.aero/content/intelligent-airport-vision
You could assume that people wanting to read information in Chinese would have a Chinese font installed on their system, therefore specifying _sans would be a solution.
I believe you need to be concerned about using a Unicode font (one that has chinese glyphs in it, think you can use the character map program in windows to browse the glyphs in a font). I haven't actually had to do localization for China ever so I'm not positive, but here's the wiki page on unicode fonts http://en.wikipedia.org/wiki/Unicode_font.