FontLab Forum
2010-03-14, 01:21:02 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the FontLab forum, read how to use it! Update: Archives from old MSN forums are now available on our forum.
 
   Home   Help Search Calendar Downloads Tags Login Register  
Del.icio.us Digg FURL FaceBook Stumble Upon Reddit SlashDot

Pages: [1]
  Print  
Author Topic: Possible with Opentype  (Read 1672 times)
srakete
Newbie
*

Karma: +0/-0
Germany Germany

Posts: 1


View Profile
« on: 2009-05-06, 09:42:06 »

Hi,
I wonder, if it would be possible to create an Opentype Font that will add certain characters, if a combination of characters are being typed. E.g. if the user types 5/6 it will be substituted by (5/6) adding the brackets around the numbers. I have seen something similar with fractions.
Thanks for any help.

Stefan
Logged
tiro_hudson
Beta: FontLab Studio Win
Jr. Member
***

Karma: +8/-0
Canada Canada

Posts: 72


View Profile WWW Email
« Reply #1 on: 2009-05-08, 16:49:19 »

Note that, if you use OpenType for this, you are not adding characters: you are adding glyphs. The text string in the background would remain without parentheses.

It is not possible to perform many-to-many substitutions in OpenType, but you can handle this kind of thing by using a one-to-many substitution with context. You will need two separate lookups: one for the opening parenethesis and one for the closing one. Here is how the lookups would work expressed in VOLT syntax; I'm sure someone else can explain how the corresponding FDK/FontLab syntax would look, or perhaps you can figure it out:

<numeral> -> parenleft <numeral>
| {slash, fraction}


for the opening parenthesis, and then

<numeral> -> <numeral> parenright
{slash, fraction} |


That is the most simple lookup context to deal with a pair of numerals separated by a slash or fraction slash glyph. You could also employ longer context strings to put parentheses around longer groups of numerals.

Logged
gohebrew
Jr. Member
**

Karma: +0/-0
United States United States

Posts: 5


View Profile Email
« Reply #2 on: 2009-06-29, 03:22:23 »

(Hi John)

GSUB seems to be a poorly known feature of OT, judging from users understanding. People seem to be more familiar with GPOS.

Is there another OT feature that can be used by Volt or FontLab Studio to become enabled by an inputed tag from a script or plug-in from InDesign CS/4 (ME). And if that inputed tag does not come, it disables certain GSUB for example?

Like Adobe's Content Server technology, but not just for PDFs?
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!