[...] Ideally one would like to throw SIL-Doulos-IPA93 out the
window and use instead the new DoulosSIL which is a true
Unicode font. But of course this would require changing the codepoints
of a lot of characters. I am surprised that SIL have not provided a macro
that changes characters from the former to the corresponding characters
of the latter. TECKit is much too low-level to be helpful to most people.
Below are some macros that should change the phonetics from any old SIL IPA
font into Unicode.
They work in WinWord, not 100% sure about Mac Word.
Best create a new module (called, say, "SIL"), and then paste everything
into it.
Some caveats and comments are mentioned in the main macro, SilCode2Unicode.
The macro takes quite some time on a sizeable document.
I don't know what TECKit is, so I can't say how it would compare.
BTW, in WinWord old documents using old SIL fonts tend to bring along old
compatibility options that mess up the spacing of IPA characters.
If you have weird character spacing in the phonetics, set the compatibility
options to their default.
Regards,
Klaus
Option Explicit
' change fonts if needed...
' old SIL IPA font:
Public Const IPAfont_old = "SILDoulos IPA93"
' new Unicode font for phonetics:
Public Const IPAfont_new = "SILDoulosUnicodeIPA"
Sub SilCode2Unicode()
' **** Requirements: ****
' -- document uses old SIL font
' (this font doesn't need to be installed, though!)
' old font (SILSophia IPA93, SILDoulos, ...) in public const old_font
' -- a Unicode font with IPA code block like "Arial Unicode MS"
' new Unicode font (Arial Unicode MS ...) in public const new_font
' **** Caveats: ****
' Not all chars from the old SIL font are converted! (accents ...)
' So best search for the old SIL font after the macro has run.
' Additional formatting like color, bold ... gets lost!
' take care if you later save as text...
' ASCII chars 132, 147, 148 turn into Ascii 34 (= "),
' 145, 146 into 39 (= ')
' 160 into 32 (= space)
SIL2Uni2 &HF0A0, &HA0
' SIL2Uni 126, &H303
SIL2Uni2 &HF02F, &H2F
SIL2Uni 32, &H20
SIL2Uni2 &HF028, &H28
SIL2Uni2 &HF029, &H303
' SIL2Uni "&HF029;", &H303
SIL2Uni 44, &H2C
SIL2Uni 46, &H2E
SIL2Uni 47, &H2F
SIL2Uni 65, &H251
SIL2Uni 66, &H3B2
SIL2Uni 67, &HE7
SIL2Uni 68, &HF0
SIL2Uni 69, &H25B
SIL2Uni 70, &H264
SIL2Uni 71, &H262
SIL2Uni 72, &H2B0
SIL2Uni 73, &H26A
SIL2Uni 74, &H2B2
SIL2Uni 75, &H29C
SIL2Uni 77, &H271
SIL2Uni 78, &H14B
SIL2Uni 79, &HF8
SIL2Uni 80, &H275
SIL2Uni 81, &HE6
SIL2Uni 82, &H27E
SIL2Uni 83, &H283
SIL2Uni 84, &H3B8
SIL2Uni 85, &H28A
SIL2Uni 86, &H28B
SIL2Uni 87, &H2B7
SIL2Uni 88, &H3C7
SIL2Uni 89, &H28F
SIL2Uni 90, &H292
SIL2Uni 91, &H5B
SIL2Uni 93, &H5D
SIL2Uni 97, &H61
SIL2Uni 98, &H62
SIL2Uni 99, &H63
SIL2Uni 100, &H64
SIL2Uni 101, &H65
SIL2Uni 102, &H66
SIL2Uni 103, &H261
SIL2Uni 104, &H68
SIL2Uni 105, &H69
SIL2Uni 106, &H6A
SIL2Uni 107, &H6B
SIL2Uni 108, &H6C
SIL2Uni 109, &H6D
SIL2Uni 110, &H6E
SIL2Uni 111, &H6F
SIL2Uni 112, &H70
SIL2Uni 113, &H71
SIL2Uni 114, &H72
SIL2Uni 115, &H73
SIL2Uni 116, &H74
SIL2Uni 117, &H75
SIL2Uni 118, &H76
SIL2Uni 119, &H77
SIL2Uni 120, &H78
SIL2Uni 121, &H79
SIL2Uni 122, &H7A
SIL2Uni 123, &H280
SIL2Uni 125, &H27D
SIL2Uni 129, &H252
SIL2Uni 130, &H258
SIL2Uni 131, &H2040
SIL2Uni 140, &H250
SIL2Uni 141, &H254
SIL2Uni 167, &H282
SIL2Uni 168, &H279
SIL2Uni 169, &H260
SIL2Uni 171, &H259
SIL2Uni 172, &H289
SIL2Uni 175, &H276
SIL2Uni 178, &H274
SIL2Uni 179, &H2C1
SIL2Uni 180, &H28E
SIL2Uni 181, &H26F
SIL2Uni 184, &H278
SIL2Uni 185, &H2A2
SIL2Uni 186, &H253
SIL2Uni 189, &H290
SIL2Uni 191, &H153
SIL2Uni 192, &H295
SIL2Uni 194, &H26C
SIL2Uni 195, &H28C
SIL2Uni 196, &H263
SIL2Uni 198, &H29D
SIL2Uni 199, &H2CC
SIL2Uni 200, &H2C8
SIL2Uni 206, &H25C
SIL2Uni 207, &H25E
SIL2Uni 210, &H281
SIL2Uni 211, &H27B
SIL2Uni 215, &H284
SIL2Uni 226, &H303
SIL2Uni 227, &H28D
SIL2Uni 228, &H27A
SIL2Uni 229, &H270
SIL2Uni 231, &H265
SIL2Uni 234, &H256
SIL2Uni 235, &H257
SIL2Uni 236, &H2E0
SIL2Uni 237, &H203F
SIL2Uni 238, &H267
SIL2Uni 239, &H25F
SIL2Uni 240, &H127
SIL2Uni 241, &H26D
SIL2Uni 245, &H299
SIL2Uni 246, &H268
SIL2Uni 247, &H273
SIL2Uni 248, &H272
SIL2Uni 249, &H2D0
SIL2Uni 250, &H266
SIL2Uni 251, &H2A1
SIL2Uni 252, &H291
SIL2Uni 253, &H29B
SIL2Uni 254, &H255
SIL2Uni 255, &H288
End Sub
Private Sub SIL2Uni(s, u)
Dim SN
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Font.Name = IPAfont_old
Selection.Find.Replacement.Font.Name = IPAfont_new
SN = &HF000 + Val(s)
With Selection.Find
.Text = ChrW(SN)
.Replacement.Text = ChrW(u)
.Forward = True
.Wrap = wdFindAsk
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Wrap:=wdFindContinue, Replace:=wdReplaceAll
End Sub
Private Sub SIL2Uni2(s, u)
Dim SN
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Font.Name = IPAfont_old
Selection.Find.Replacement.Font.Name = IPAfont_new
SN = &H0 + s
With Selection.Find
.Text = ChrW(SN)
.Replacement.Text = ChrW(u)
.Forward = True
.Wrap = wdFindAsk
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Wrap:=wdFindContinue, Replace:=wdReplaceAll
End Sub