Background
Background
ManyEastAsianscriptscanbewrittenhorizontallyorvertically
In[]:=
sample=StringSplit["ABCDEFGH",""]
Out[]=
{A,B,C,D,E,F,G,H}
In[]:=
Rasterize[Style[Grid[Transpose@Reverse@Partition[sample,4],Spacings{0.3,-0.05},Dividers{All,False}]]//Style[#,FontSize32]&]
Out[]=
Recently Coca-Cola Beverages Shanghai Co Ltd. works with FounderType to publish a retrospective font design widely used about when this beverage was first introduced to Chinese market. This typeface extends the coverage to more than 6769 Chinese character and 976 other symbols. I feel remake/remastered version of digital art is quite popular nowadays. Capcom’s resident evil 2 and 3 Nemesis , Nike, Jordan, Toyota ... you name it, they all revive some brands or products as best-sellers in early 80 or 90’s.
40yearsago
In[]:=
RemoveBackground
,{"Background",RGBColor[212,174,125]}
Out[]=
Typeset Conversion
Typeset Conversion
I use a similar algorithm like above and StringSplit function to handle the paragraphing. Normally there is no the CJK punctuations in the ancient scripts, which makes it hard to read by modern standards. The following sample text is from Rulin waishi, a popular fiction by Wu Jingzi during Qing dynasty
In[]:=
WolframAlpha["qing dynasty",{{"Timeline:HistoricalPeriodData",1},"Content"}]
Out[]=
On most website with manually curated scripts, you will find the text just in horizontal writing
In[]:=
text=StringSplit"人生南北多歧路,将相神仙,也要凡人做。百代兴亡朝复暮,江风吹倒前朝树。功名富贵无凭据,费尽心情,总把流光误。浊酒三杯沉醉去,水流花谢知何处。",",""。";
I use the following functions to break down the long string to character and alter the sequence.
In[]:=
wordlists=Reverse[Flatten[StringSplit[#,""]&/@text,{1}]];
Meanwhile I use SpanFromAbove to handle paragraph with different vertical length.
In[]:=
padded=With[{maxLeng=Max[Length/@wordlists]},PadRight[#,maxLeng,SpanFromAbove]&/@wordlists];
In[]:=
Style[Grid[Transpose[padded],Spacings{0.3,-0.05},Dividers{All,False}],FontFamily"Coca-Cola Care Font KaiTi",FontSize28]//Rasterize
Out[]=
Let me quickly translate the poem, as the opening remark of the fiction: life is like a road trip, has turns and crossroads. Gods and mortal are of no difference (reminds me of that Krato beats all corrupted Olympiad Champions in GOW franchise). Dynasty and empire rises and fall, leave everything in vain. Fame and wealth do not last very long, so waste no time on them. Take a sip of good wine and enjoy the moment, it is pointless to worry about the future as we will never know where steam of creek carries decayed petals.
Another example is from , mathematical canon from beginning of Eastern Han and later commented and edited by Liu Hui, with slightly modified typeface functions.
In[]:=
WolframAlpha["Eastern Han",{{"Timeline:HistoricalPeriodData",1},"Content"}]
Out[]=
In[]:=
WolframAlpha["liu hui",{{"WikipediaSummary:PeopleData",1},"Content"}]
Out[]=
Liu Hui (fl. 3rd century CE) was a Chinese mathematician and writer who lived in the state of Cao Wei during the Three Kingdoms period (220–280) of China. In 263, he edited and published a book with solutions to mathematical problems presented in the famous Chinese book of mathematics known as The Nine Chapters on the Mathematical Art, in which …
The script works with how rectangular area is computed for land survey (fang tian, 方田)
In[]:=
text=;wordlists=Reverse[Flatten[StringSplit[#,""]&/@text,{1}]];padded=With{maxLeng=Max[Length/@wordlists]},PadRightIf#[[1]]==="答",{,}~Join~#,#,maxLeng,SpanFromAbove&/@wordlists;
Every vertical line which starts with indentation indicates it is the answer of the short question. The ending remark on the left hand side says the unit conversion rule between Chinese acre and step squared (step is a length unit used throughout the canon)
In[]:=
Style[Grid[Transpose[padded],Spacings{0.3,-0.05},Dividers{All,False}],FontFamily"Coca-Cola Care Font KaiTi",FontSize28]//Rasterize
Out[]=
The last example about the font set is EUDC for Chinese ligatures and polysyllabic characters. The front end can wrap around multiple characters from a special combination and ended with % in one large compound word. I have only tested on Windows 10 so far.
In[]:=
CellPrint@TextCell"招财进宝%都是命%","Text",FontFamily"Coca-Cola Care Font KaiTi",FontSize48//Rasterize
Summary
Summary
◼
Use Reverse and Transpose to rearrange horizontal writing into vertical writing
◼
Use Coca-Cola Care Font to render vertical typesetting beautifully in front end
◼
CellPrint supports EUDC for special ligatures in this font (I only tested on windows)