apparelsasa.blogg.se

Fonts for chinese characters
Fonts for chinese characters















Unlike real world image, we can generate image of a character with arbitrary resolution.My guess is that Chinese characters are much more complex in structure and by nature closer to images than letters, so a CNN based approach makes more sense in this case. Fully-Connected layers used in both Erik and Shumeet's work didn't work very well for Chinese characters, generating noisier and unstable output.Without it, the network simply gives up or trapped in trivial solutions, like all white or black images. So I end up this trickling down shape architecture, with various size of convolutions on different layers, each contains about the same number of parameters, so the network can capture details at different level. During my experiments, I started out using stacked straight up plain 3x3 convolutions, but it end up performing badly or not converging on more difficult and exotic fonts. Choice larger than 4 seems hitting the point of diminishing return, increasing in running time but no noticeable improvement on either loss or output. Layer number n is configurable, the larger n tends to generate more detailed and cleaner output, but takes longer time to train, usual choice is between.Also total variation loss is applied for image smoothness. MAE tends to yield sharper and cleaner image, while MSE falls to more blurred and grayish ones. The network is minimized against pixel wise MAE(Mean Absolute Error) between predicted output and ground truth, rather than than more commonly used MSE(Mean Square Error), as mentioned in Erik's blog.Each Convolutional layer is followed by a Batch Normalization layer then a ReLu layer, and zero padding all the way down.Network StructureĪfter trying various different architectures, including more sophisticated ones with residuals and deconvolution, I ended up with a more traditional flavour top-down CNN structure, as shown below. This project is heavily inspired by the awesome blog Analyzing 50k fonts using deep neural networks from Erik Bernhardsson, and great paper Learning Typographic Style from Shumeet Baluja. Once the learning is finished, it can be used to infer the shape for the rest of characters. A neural network is trained to approximate the transformation in between two fonts given a subset of pairs of examples. Specifically, the whole font design process is formulated as a style transfer problem from a standard look font, such as SIMSUN, to an stylized target font. This project is an explorational take on this using deep learning. What about the designer just creates a subset of characters, then let computer figures out what the rest supposed to look like? After all, Chinese characters are consisting of a core set of radicals(偏旁部首), and the same radical looks pretty similar on different characters. To make a GBK (a character set standardized by Chinese government) compatible font, designers will need to design unique looks for more than 26,000 Chinese characters, a daunting effort that could take years to complete. MotivationĬreating font is a hard business, creating a Chinese font is an even harder one. Please refer to the follow up zi2zi project for better result. You want "AR PL UMing CN" for simplified Chinese.Rewrite: Neural Style Transfer For Chinese Fonts (I'm from Taiwan so I use the Traditional Chinese variant ending in TW. WenQuanYi Zen Hei,文泉驛正黑,文泉驿正黑:style=RegularĪnd on your Fedora 13 system it's likely to be: The default Chinese font on Fedora 16 is: The trick to finding the right font for a language on Linux is:

#FONTS FOR CHINESE CHARACTERS MAC#

You're seeing nothing due to not selecting the correct Chinese font, which is different on Windows, Mac and Linux. % latex+dvips, latex+dvipdfm(x) or pdflatex % Simplified Chinese fonts should be installed Or % UTF-8 encoding, pdflatex or latex+dvipdfmx If you just want to typeset only a few Chinese characters, you can use CJK with pdfLaTeX or xeCJK with XeLaTeX. The proper fonts preinstalled in the OS should be selected automatically. everything is set.įor the latest version of ctex bundle (v2.x), XeLaTeX is well tested and supports Windows/Mac/Linux. Font sizes, indentation, name translation, line spacing. % Compile with latex+dvipdfmx, pdflatex, xelatex or lualatex The easiest way is (for Simplified Chinese document only): % UTF-8 encoding















Fonts for chinese characters