diff options
Diffstat (limited to 'Build/source/texk/makejvf/write.c')
-rw-r--r-- | Build/source/texk/makejvf/write.c | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/Build/source/texk/makejvf/write.c b/Build/source/texk/makejvf/write.c index 5d41b26c6f5..dae91045ec6 100644 --- a/Build/source/texk/makejvf/write.c +++ b/Build/source/texk/makejvf/write.c @@ -1,6 +1,7 @@ #include <kpathsea/config.h> #include "makejvf.h" #include "uniblock.h" +#include "usrtable.h" #include <stdio.h> #include <stdlib.h> @@ -85,7 +86,8 @@ void writevf(int code, FILE *fp) { int cc,cc2,cc3,cc4,w,skip=0,skip2=0,height=1000; char buf[256],buf2[256]; - int fidshift=0; + int fidshift=0,l; + int outcode=code; if (fidzero) fidshift=-1; @@ -306,6 +308,19 @@ void writevf(int code, FILE *fp) break; } + for (l = 0; l < usertable_replace_max; l++) { + if (code == usertable_replace[l].codepoint) { + outcode = usertable_replace[l].newcodepoint; + break; + } + } + for (l = 0; l < usertable_move_max; l++) { + if (code == usertable_move[l].codepoint) { + skip = usertable_move[l].moveright * zw; + skip2 = usertable_move[l].movedown * zh; + goto outputj; + } + } if (skip != -rightamount && enhanced) { fprintf(stderr, "[Warning] Conflicting MOVERIGHT value for code %x,\n" @@ -314,6 +329,8 @@ void writevf(int code, FILE *fp) code, skip, -rightamount); skip=-rightamount; } + +outputj: if (kanatfm) cc=4; else @@ -340,14 +357,15 @@ void writevf(int code, FILE *fp) fputc(172+fidshift,fp); /* FONT_NUM_1 */ } fputc(129,fp); /* SET2 */ - fputnum(code,2,fp); /* char code */ + fputnum(outcode,2,fp); /* char code */ } void writevfu(int code, FILE *fp) { int cc,cc2,cc3,cc4,w,skip=0,skip2=0,height=1000; char buf[256],buf2[256]; - int fidshift=0; + int fidshift=0,l; + int outcode=code; if (fidzero) fidshift=-1; @@ -691,6 +709,19 @@ void writevfu(int code, FILE *fp) break; } + for (l = 0; l < usertable_replace_max; l++) { + if (code == usertable_replace[l].codepoint) { + outcode = usertable_replace[l].newcodepoint; + break; + } + } + for (l = 0; l < usertable_move_max; l++) { + if (code == usertable_move[l].codepoint) { + skip = usertable_move[l].moveright * zw; + skip2 = usertable_move[l].movedown * zh; + goto outputu; + } + } if (skip != -rightamount && enhanced) { fprintf(stderr, "[Warning] Conflicting MOVERIGHT value for code %x,\n" @@ -699,11 +730,13 @@ void writevfu(int code, FILE *fp) code, skip, -rightamount); skip=-rightamount; } + +outputu: if (kanatfm) cc=4; else cc=3; - if (code>=0x10000) + if (outcode>=0x10000) cc+=1; if (skip) cc+=numcount(skip)+1; @@ -726,12 +759,12 @@ void writevfu(int code, FILE *fp) else fputc(172+fidshift,fp); /* FONT_NUM_1 */ } - if (code>=0x10000) { + if (outcode>=0x10000) { fputc(130,fp); /* SET3 */ - fputnum(code,3,fp); /* char code */ + fputnum(outcode,3,fp); /* char code */ } else { fputc(129,fp); /* SET2 */ - fputnum(code,2,fp); /* char code */ + fputnum(outcode,2,fp); /* char code */ } } |