FontLab Forum
2012-05-21, 00:18:27 *
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: algorithm to convert WTS to Unicode  (Read 1215 times)
ArchivePoster
Guest
« on: 2004-03-08, 23:23:00 »

Posted by: ansteyfamily
         
Hi all,
 
I got the SBL font yesterday and wrote an algorithm to convert the entire Westminster MT ascii text  (WTS)  into unicode for the SBL font encoding. It is written in VBA, but it is very straigtforward. Here is an outline of what needs to happen. I think it is correct, but I would like to hear of any mistakes. I've left out the usual stuff like declaring variables. It uses two VB functions: InStr(str1, str2), that gives the position of str1 in str2 and replace(str1,str2,str3) that replaces str2 with str3 in str1. (the WTS version is the one that bworks 6.0 exports. I think it is much the same as the WTS original, without the ]n tags.)
 
You may have a better algorithm. Please share it!
 
Please email me for any clarifications or any errors you find.
 
With regards,
Matthew Anstey
Vrije Universiteit, Amsterdam
Charles Sturt University, School of Theology, Canberra, Australia
 
Function fncSBL (strWTS as string) as String
'constants
strC = ")BGDHWZX+YKLMNS(PCQR&$T" ' WTS consonants
strV =":AEIOUF" & Chr$(34) 'vowels
strA = "0123456789" 'accents

         
Logged
ArchivePoster
Guest
« Reply #1 on: 2004-03-08, 23:26:00 »

Posted by: ansteyfamily
         
Hi,
 
oops, I meant InStr(str1, str2), that gives the position of str2 in str1.
 
cheers,
matthew

         
Logged
ArchivePoster
Guest
« Reply #2 on: 2004-03-09, 12:50:00 »

Posted by: ansteyfamily
         
Hi again,
 
one more omission. WTS uses "#" as a sin/shin without any dot, so for this case, p1=chrw$(&H5E9).
 
cheers,
matthew

         
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!