/[rdesktop]/sourceforge.net/trunk/rdesktop/orders.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/orders.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 17 by matty, Thu Sep 28 15:54:11 2000 UTC revision 23 by matty, Tue Oct 17 08:24:09 2000 UTC
# Line 722  static void process_fontcache(STREAM s) Line 722  static void process_fontcache(STREAM s)
722  {  {
723          HGLYPH bitmap;          HGLYPH bitmap;
724          uint8 font, nglyphs;          uint8 font, nglyphs;
725          uint16 character, baseline, width, height;          uint16 character, offset, baseline, width, height;
726          uint8 *data, *rev_data, in, out;          uint8 *data, *rev_data, in, out;
727          int i, j, datasize;          int i, j, datasize;
728    
# Line 734  static void process_fontcache(STREAM s) Line 734  static void process_fontcache(STREAM s)
734          for (i = 0; i < nglyphs; i++)          for (i = 0; i < nglyphs; i++)
735          {          {
736                  in_uint16_le(s, character);                  in_uint16_le(s, character);
737                  in_uint8s(s, 2); /* unknown */                  in_uint16_le(s, offset);
738                  in_uint16_le(s, baseline);                  in_uint16_le(s, baseline);
739                  in_uint16_le(s, width);                  in_uint16_le(s, width);
740                  in_uint16_le(s, height);                  in_uint16_le(s, height);
# Line 742  static void process_fontcache(STREAM s) Line 742  static void process_fontcache(STREAM s)
742                  datasize = (height * ((width + 7) / 8) + 3) & ~3;                  datasize = (height * ((width + 7) / 8) + 3) & ~3;
743                  in_uint8p(s, data, datasize);                  in_uint8p(s, data, datasize);
744    
745                  /* Need to reverse bit order */                  bitmap = ui_create_glyph(width, height, data);
746                  rev_data = xmalloc(datasize);                  cache_put_font(font, character, offset, baseline,
747                                    width, height, bitmap);
                 for (j = 0; j < datasize; j++)  
                 {  
                         in = data[j];  
                         out = 0;  
                         if (in & 1) out |= 128;  
                         if (in & 2) out |= 64;  
                         if (in & 4) out |= 32;  
                         if (in & 8) out |= 16;  
                         if (in & 16) out |= 8;  
                         if (in & 32) out |= 4;  
                         if (in & 64) out |= 2;  
                         if (in & 128) out |= 1;  
                         rev_data[j] = out;  
                 }  
   
                 bitmap = ui_create_glyph(width, height, rev_data);  
                 xfree(rev_data);  
   
                 cache_put_font(font, character, baseline, width, height, bitmap);  
748          }          }
749  }  }
750    

Legend:
Removed from v.17  
changed lines
  Added in v.23

  ViewVC Help
Powered by ViewVC 1.1.26