Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Formatting Text

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old January 29th, 2014, 02:02 AM
jimmyhartington jimmyhartington is offline
Regular Contributor
 
Join Date: Nov 2012
Posts: 60
Default Re: Chinese charactes with Arial Unicode - Other with Akzidenz Grotesk

I have now tried to make a new rule. And it kind of works.
Code:
var input = Field("Name other language")
var output = "";
var patt1 = "[a-zA-Z ]"
for(var i = 0; i < input.length;i++){
	    if(input[i].match(patt1)){
		output += '<f Name="Akzidenz-Grotesk Pro Bold">'+input[i];
	} else {
		output += '<f name="Arial Unicode MS">'+input[i];
	}
}
return output;
}
This is the result from this input "GD工程公司":
Code:
<f Name="Akzidenz-Grotesk Pro Bold">G<f Name="Akzidenz-Grotesk Pro Bold">D<f name="Arial Unicode MS"><<f Name="Akzidenz-Grotesk Pro Bold">u<f Name="Akzidenz-Grotesk Pro Bold">n<f Name="Akzidenz-Grotesk Pro Bold">i<f Name="Akzidenz-Grotesk Pro Bold">c<f Name="Akzidenz-Grotesk Pro Bold">o<f Name="Akzidenz-Grotesk Pro Bold">d<f Name="Akzidenz-Grotesk Pro Bold">e<f name="Arial Unicode MS">><f name="Arial Unicode MS">5<f Name="Akzidenz-Grotesk Pro Bold">d<f Name="Akzidenz-Grotesk Pro Bold">e<f name="Arial Unicode MS">5<f name="Arial Unicode MS">7<f Name="Akzidenz-Grotesk Pro Bold">a<f name="Arial Unicode MS">0<f Name="Akzidenz-Grotesk Pro Bold">b<f name="Arial Unicode MS">5<f name="Arial Unicode MS">1<f name="Arial Unicode MS">6<f Name="Akzidenz-Grotesk Pro Bold">c<f name="Arial Unicode MS">5<f name="Arial Unicode MS">3<f Name="Akzidenz-Grotesk Pro Bold">f<f name="Arial Unicode MS">8<f name="Arial Unicode MS"><<f name="Arial Unicode MS">/<f Name="Akzidenz-Grotesk Pro Bold">u<f Name="Akzidenz-Grotesk Pro Bold">n<f Name="Akzidenz-Grotesk Pro Bold">i<f Name="Akzidenz-Grotesk Pro Bold">c<f Name="Akzidenz-Grotesk Pro Bold">o<f Name="Akzidenz-Grotesk Pro Bold">d<f Name="Akzidenz-Grotesk Pro Bold">e<f name="Arial Unicode MS">>
So I can see that the font tags change based on the characters. But it does not work with the unicode characters anyway.

How could I modify my rule to work the unicode characters?
__________________
Kind regards Jimmy Hartington

-------
Happy MarcomCentral® customer - OS version: OS X 10.12.6 - Acrobat version: XI - FusionPro version: 10.0.16
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:20 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.