🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1914

Font for inserting glyph [JS]

#1914
From: Scott_Braucher
Date: Thu, 15 Jan 2009 15:18
11 lines
1140 bytes
I'm using a small Javascript to insert a Unicode glyph at the text insertion point:

if (app.selection[0].constructor.name == "InsertionPoint"){
	with (app.selection[0].insertionPoints[0]){ // insertion point
				contents = String.fromCharCode(0x20A6);
	}
}

This script works, but because the glyph only exists in a few fonts, I need to add something to the script to specify the font used when inserting the glyph. I've tried to specify the insertion point appliedFont, but I can't figure out the syntax.

Any help or suggestions for an alternative approach will be appreciated.
Technical Details
Message-ID: <59b78587.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,5f33cd378ee108cf,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Scott_Braucher@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Font for inserting glyph [JS]
Message-ID: <59b78587.-1@webcrossing.la2eafNXanI>
Date: Thu, 15 Jan 2009 07:18:25 -0800
Lines: 16
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit