Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. Index: Build/source/texk/makejvf/tfmread.c
  2. ===================================================================
  3. --- Build/source/texk/makejvf/tfmread.c (revision 44884)
  4. +++ Build/source/texk/makejvf/tfmread.c (working copy)
  5. @@ -11,7 +11,7 @@
  6.  
  7. int jfmread(int kcode)
  8. {
  9. - int i,ctype = 0,w_ind,w,ll,rr,gk_ind,k_ind,g_ind;
  10. + int i,ctype=0,w_ind,w,ll=0,rr=0,gk_ind,k_ind,g_ind;
  11.  
  12. for (i = 0 ; i < nt ; i++) {
  13. if (upair(&char_type[i*4]) == kcode) {
  14. @@ -25,46 +25,44 @@
  15. w = width[w_ind];
  16.  
  17. rightamount = 0;
  18. - if (w != zw) {
  19. + if (w != zw && ctype > 0) {
  20. /* get natural length of JFM glue between <type0> and <type of kcode> */
  21. gk_ind = char_info[0*4+3]; /* remainder for <type0> */
  22. - ll = 0;
  23. - if (ctype > 0) {
  24. - for (i = 0 ; i < nl-gk_ind ; i++) {
  25. - if (glue_kern[(gk_ind+i)*4+1] == ctype) {
  26. - if (glue_kern[(gk_ind+i)*4+2] >= 128) {
  27. - k_ind = glue_kern[(gk_ind+i)*4+3];
  28. - ll = kern[k_ind];
  29. - }
  30. - else {
  31. - g_ind = glue_kern[(gk_ind+i)*4+3];
  32. - ll = glue[3*g_ind];
  33. - }
  34. - break;
  35. + if (glue_kern[gk_ind*4] >= 128) /* support for large gluekern table */
  36. + gk_ind = upair(&glue_kern[gk_ind*4+2]);
  37. + for (i = 0 ; i < nl-gk_ind ; i++) {
  38. + if (glue_kern[(gk_ind+i)*4+1] == ctype) {
  39. + if (glue_kern[(gk_ind+i)*4+2] >= 128) {
  40. + k_ind = glue_kern[(gk_ind+i)*4+3];
  41. + ll = kern[k_ind];
  42. }
  43. - if (glue_kern[(gk_ind+i)*4] >= 128)
  44. - break;
  45. + else {
  46. + g_ind = glue_kern[(gk_ind+i)*4+3];
  47. + ll = glue[3*g_ind];
  48. + }
  49. + break;
  50. }
  51. + if (glue_kern[(gk_ind+i)*4] >= 128)
  52. + break;
  53. }
  54. /* get natural length of JFM glue between <type of kcode> and <type0> */
  55. gk_ind = char_info[ctype*4+3]; /* remainder for <type of kcode> */
  56. - rr = 0;
  57. - if (ctype > 0) {
  58. - for (i = 0 ; i < nl-gk_ind ; i++) {
  59. - if (glue_kern[(gk_ind+i)*4+1] == 0) {
  60. - if (glue_kern[(gk_ind+i)*4+2] >= 128) {
  61. - k_ind = glue_kern[(gk_ind+i)*4+3];
  62. - rr = kern[k_ind];
  63. - }
  64. - else {
  65. - g_ind = glue_kern[(gk_ind+i)*4+3];
  66. - rr = glue[3*g_ind];
  67. - }
  68. - break;
  69. + if (glue_kern[gk_ind*4] >= 128) /* support for large gluekern table */
  70. + gk_ind = upair(&glue_kern[gk_ind*4+2]);
  71. + for (i = 0 ; i < nl-gk_ind ; i++) {
  72. + if (glue_kern[(gk_ind+i)*4+1] == 0) {
  73. + if (glue_kern[(gk_ind+i)*4+2] >= 128) {
  74. + k_ind = glue_kern[(gk_ind+i)*4+3];
  75. + rr = kern[k_ind];
  76. }
  77. - if (glue_kern[(gk_ind+i)*4] >= 128)
  78. - break;
  79. + else {
  80. + g_ind = glue_kern[(gk_ind+i)*4+3];
  81. + rr = glue[3*g_ind];
  82. + }
  83. + break;
  84. }
  85. + if (glue_kern[(gk_ind+i)*4] >= 128)
  86. + break;
  87. }
  88. if (abs(zw - ll - w - rr) <= 1) /* allow round-off error */
  89. /* character width is truncated,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement