By default (controllable via options.txt), Jskad now fixes the Tahoma curly

brace problem upon opening any RTF document.

The TMW_RTF_TO_THDL_WYLIE test baselines changed because
I fixed (a while ago) some inconsistencies between the EWTS standard and
Jskad.

Conversion of TibetanMachineWeb8.40, @#, to Wylie now works correctly.

Unfortunately, though, typing @# doesn't produce 8.40, it still produces
8.38 and 8.39, two glyphs.
This commit is contained in:
dchandler 2003-05-28 00:40:59 +00:00
parent a144b125ca
commit 6f0390c5d6
5 changed files with 32 additions and 6 deletions

View file

@ -131,8 +131,12 @@ public class TibetanDocument extends DefaultStyledDocument {
* @see #setTibetanFontSize(int size)
*/
public void appendDuff(int offset, String s, MutableAttributeSet attr) {
appendDuff(tibetanFontSize, offset, s, attr);
}
private void appendDuff(int fontSize, int offset, String s, MutableAttributeSet attr) {
try {
StyleConstants.setFontSize(attr, tibetanFontSize);
StyleConstants.setFontSize(attr, fontSize);
insertString(offset, s, attr);
}
catch (BadLocationException ble) {
@ -146,13 +150,17 @@ public class TibetanDocument extends DefaultStyledDocument {
* @param pos the position at which you want to insert text
*/
public int insertDuff(int pos, DuffData[] glyphs) {
return insertDuff(tibetanFontSize, pos, glyphs);
}
private int insertDuff(int fontSize, int pos, DuffData[] glyphs) {
if (glyphs == null)
return pos;
MutableAttributeSet mas;
for (int i=0; i<glyphs.length; i++) {
mas = TibetanMachineWeb.getAttributeSet(glyphs[i].font);
appendDuff(pos, glyphs[i].text, mas);
appendDuff(fontSize, pos, glyphs[i].text, mas);
pos += glyphs[i].text.length();
}
return pos;
@ -368,7 +376,13 @@ public class TibetanDocument extends DefaultStyledDocument {
break;
}
if (null != toReplaceWith) {
insertDuff(i, toReplaceWith);
int fontSize = tibetanFontSize;
try {
fontSize = ((Integer)getCharacterElement(i).getAttributes().getAttribute(StyleConstants.FontSize)).intValue();
} catch (Exception e) {
// leave it as tibetanFontSize
}
insertDuff(fontSize, i, toReplaceWith);
remove(i+1, 1);
}
}

View file

@ -21,7 +21,7 @@ k,kh,g,ng,c,ch,j,ny,t,th,d,n,p,ph,b,m,ts,tsh,dz,w,zh,z,',y,r,l,sh,s,h,a,T,Th,D,N
a,i,u,e,o,I,U,ai,au,A,-i,-I
<?Other?>
_, ,/,|,!,:,;,@,#,$,%,(,),H,M,`,&
_, ,/,|,!,:,;,@,#,$,%,(,),H,M,`,&,@#
<?Input:Punctuation?>
//_~32,1~0,32
@ -43,6 +43,7 @@ H~239,1~~8,92~~~~~~~0F7F
M~~~8,91~~~~~~~0F7E
`~241,1~~8,94~~~~~~~0F83
&~177,4~~8,93~~~~~~~0F85
@#~201,1~~9,40
<?Input:Tibetan?>
Dz~146,5~~10,42
@ -996,7 +997,7 @@ mnyam.yig.mgo.rgyan~36,5~~9,36~~~~~~~0F09
37,5~~9,37
zla tse gcig~210,1~~9,38~~~~~~~0F04
half zla tse gcig~200,1~~9,39~~~~~~~0F05
zla tse gnyis~201,1~~9,40
// zla tse gnyis~201,1~~9,40 is now punctuation.
yig.mgo.phur.shad~38,5~~9,41~~~~~~~0F06
Yig.mgo.tsheg.shad~39,5~~9,42~~~~~~~0F07