ÇëÑ¡¶¨Òª²é¿´µÄº¯Êý
Ä¿Ç°¹²ÓÐ27¸öº¯Êý
get_chi_font

  Ô­ÐÍ£ºextern void get_chi_font(char *str, char *buf);
              
  Ó÷¨£º#include <system.h>
  
  ¹¦ÄÜ£ºÈ¡´ºº×ÖµãÕó
  
  ˵Ã÷£º°ÑstrËùÖ¸ÏòµÄºº×ÖµÄ16*16µãÕóÐÅÏ¢´æ·ÅÔÚbufÖС£
        buf±ØÐëÓÐ×ã¹»µÄ¿Õ¼ä£¨>32×Ö½Ú£©À´ÈÝÄÉ·µ»ØµÄÊý¾Ý¡£
        Ö»·µ»ØstrÖ¸ÏòµÄµÚÒ»¸öºº×ֵĵãÕóÊý¾Ý¡£·µ»ØµÄµãÕóÅÅÁÐÈçÏ£º
        
          µÚÒ»×Ö½Ú  Ê®Áù×Ö½Ú
          µÚ¶þ×Ö½Ú  Ê®Æß×Ö½Ú
          ...       ...
          Ê®ËÄ×Ö½Ú  µÚ30×Ö½Ú
          Ê®Îå×Ö½Ú  µÚ31×Ö½Ú
    
  ¾ÙÀý£º

      // get_chi_font.c
      
      #include <system.h>

      main()
      {
        char buf[32];
        char *s="ÎÄÇúÐÇ",*p;
        int i,j,k;     // Loop variable
        int x=0,y=0;   // screen location to display HZ
        int r;         // current byte

        clrscr();
        gotoxy(10,10); // Hide Cursor
        
        p=s;
        while(*p)
        {
          get_chi_font(p,buf);
          for(i=0;i<2;i++)
          {
            for(j=0;j<16;j++)
            {
              r=buf[i*16+j];
              for(k=0;k<8;k++)
              {
                putpixel(x+i*8+k,y+j,((r<<k)&0x80)?1:0);
              }
            }
          }
          p+=2;   // forward a Chinese Character(HZ), two bytes
          x+=16;
        }
        
        getchar();
        return 0;
      }
      
  Ïà¹Øº¯Êý£ºwrite_chi_font