Changeset 40124

Show
Ignore:
Timestamp:
08/22/17 14:51:11 (4 months ago)
Author:
eugene
Message:

fix font size change for super and subscript

Location:
branches/eam_branches/ohana.20170822/src/libkapa/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20170822/src/libkapa/src/KapaWindow.c

    r39926 r40124  
    9494  graphdata[0].xmax = graphdata[0].ymax = 1.0; 
    9595 
    96   graphdata[0].style = graphdata[0].ptype = 2; 
     96  graphdata[0].style = KAPA_PLOT_POINTS; 
     97  graphdata[0].ptype = KAPA_POINT_BOX_SOLID; 
    9798  graphdata[0].ltype = graphdata[0].color = 0; 
    9899  graphdata[0].etype = graphdata[0].ebar = 0; 
  • branches/eam_branches/ohana.20170822/src/libkapa/src/PSRotFont.c

    r39457 r40124  
    9090    /* check for special characters */ 
    9191    if (!code && !protect) { 
    92       /* superscript character (^) */ 
     92      /* subscript character (_) */ 
    9393      if (N == 94) { 
    9494        PSDumpRotSegment (f, segment, &Nseg); 
    95         SetRotFont (currentname, (int)(0.8*currentsize)); 
     95        PSSetFont (f, currentname, (int)(0.8*currentsize)); 
    9696        currentfont = GetRotFontData (&currentscale); 
    9797        Yoff = 0.75*currentscale*dY; 
    9898        fprintf (f, "0 %d rmoveto\n", Yoff); 
    9999        YoffBase += Yoff; 
    100         PSSetFont (f, currentname, currentsize); 
    101         continue; 
    102       } 
    103       /* subscript character (_) */ 
     100        // PSSetFont (f, currentname, currentsize); 
     101        continue; 
     102      } 
     103      /* superscript character (^) */ 
    104104      if (N == 95) {  
    105105        PSDumpRotSegment (f, segment, &Nseg); 
    106         SetRotFont (currentname, (int)(0.8*currentsize)); 
     106        PSSetFont (f, currentname, (int)(0.8*currentsize)); 
    107107        currentfont = GetRotFontData (&currentscale); 
    108108        Yoff = -0.5*currentscale*dY; 
    109109        fprintf (f, "0 %d rmoveto\n", Yoff); 
    110110        YoffBase += Yoff; 
    111         PSSetFont (f, currentname, currentsize); 
     111        // PSSetFont (f, currentname, currentsize); 
    112112        continue; 
    113113      } 
     
    115115      if (N == 124) { 
    116116        PSDumpRotSegment (f, segment, &Nseg); 
    117         SetRotFont (currentname, basesize); 
     117        PSSetFont (f, currentname, basesize); 
    118118        currentfont = GetRotFontData (&currentscale); 
    119119        fprintf (f, "0 %d rmoveto\n", -YoffBase); 
    120120        YoffBase = 0; 
    121         PSSetFont (f, currentname, currentsize); 
     121        // PSSetFont (f, currentname, currentsize); 
    122122        continue; 
    123123      } 
     
    145145        PSDumpRotSegment (f, segment, &Nseg); 
    146146        if (string[i+1] == 'h') { 
    147           SetRotFont ("helvetica", currentsize); 
    148           currentfont = GetRotFontData (&currentscale); 
    149           PSSetFont (f, currentname, currentsize); 
     147          PSSetFont (f, "helvetica", currentsize); 
     148          currentfont = GetRotFontData (&currentscale); 
     149          // PSSetFont (f, currentname, currentsize); 
    150150        } 
    151151        if (string[i+1] == 't') { 
    152           SetRotFont ("times", currentsize); 
    153           currentfont = GetRotFontData (&currentscale); 
    154           PSSetFont (f, currentname, currentsize); 
     152          PSSetFont (f, "times", currentsize); 
     153          currentfont = GetRotFontData (&currentscale); 
     154          // PSSetFont (f, currentname, currentsize); 
    155155        } 
    156156        if (string[i+1] == 'c') { 
    157           SetRotFont ("courier", currentsize); 
    158           currentfont = GetRotFontData (&currentscale); 
    159           PSSetFont (f, currentname, currentsize); 
     157          PSSetFont (f, "courier", currentsize); 
     158          currentfont = GetRotFontData (&currentscale); 
     159          // PSSetFont (f, currentname, currentsize); 
    160160        } 
    161161        if (string[i+1] == 's') { 
    162           SetRotFont ("symbol", currentsize); 
    163           currentfont = GetRotFontData (&currentscale); 
    164           PSSetFont (f, currentname, currentsize); 
     162          PSSetFont (f, "symbol", currentsize); 
     163          currentfont = GetRotFontData (&currentscale); 
     164          // PSSetFont (f, currentname, currentsize); 
    165165        } 
    166166        i++; 
     
    176176  fprintf (f, "stroke grestore\n"); 
    177177  free (segment); 
    178   SetRotFont (basename, basesize); 
     178  PSSetFont (f, basename, basesize); 
    179179} 
    180180 
  • branches/eam_branches/ohana.20170822/src/libkapa/src/bDrawFuncs.c

    r40123 r40124  
    7878// "bDrawColor color" is one of the hardwired colors in KapaColors.c 
    7979void bDrawSetColor (bDrawBuffer *buffer, bDrawColor color) { 
    80   fprintf (stderr, "set color %d\n", color); 
    8180  buffer->bColor = color; 
    8281  buffer->bColor_R = buffer->palette[color].red;