"Fossies" - the Fresh Open Source Software Archive

Member "unifont-12.1.02/src/unifontpic.h" (25 May 2019, 8837 Bytes) of package /linux/misc/unifont-12.1.02.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "unifontpic.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 12.1.01_vs_12.1.02.

    1 /*
    2    unifontpic.h - header file for unifontpic.c.
    3 
    4    Author: Paul Hardy, July 2017
    5 
    6    Copyright (C) 2017 Paul Hardy
    7 
    8    LICENSE:
    9 
   10       This program is free software: you can redistribute it and/or modify
   11       it under the terms of the GNU General Public License as published by
   12       the Free Software Foundation, either version 2 of the License, or
   13       (at your option) any later version.
   14 
   15       This program is distributed in the hope that it will be useful,
   16       but WITHOUT ANY WARRANTY; without even the implied warranty of
   17       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18       GNU General Public License for more details.
   19 
   20       You should have received a copy of the GNU General Public License
   21       along with this program.  If not, see <http://www.gnu.org/licenses/>.
   22 */
   23 
   24 
   25 #define MAXSTRING 256  /* Maximum input string allowed */
   26 
   27 #define HEADER_STRING "GNU Unifont 12.1.02" /* to be printed as chart title */
   28 
   29 /*
   30      Define the array of Unifont ASCII glyphs, code points 0 through 127.
   31      This allows using unifontpic to print charts of glyphs above Unicode
   32      Plane 0.  These were copied from font/plane00/unifont-base.hex, plus
   33      U+0020 (ASCII space character).
   34 */
   35 const char *ascii_hex [128] = {
   36    "0000:AAAA00018000000180004A51EA505A51C99E0001800000018000000180005555",
   37    "0001:AAAA00018000000180003993C252325F8A527193800000018000000180005555",
   38    "0002:AAAA00018000000180003BA5C124311989247125800000018000000180005555",
   39    "0003:AAAA00018000000180007BA5C1247919C1247925800000018000000180005555",
   40    "0004:AAAA000180000001800079BFC2487A49C2487989800000018000000180005555",
   41    "0005:AAAA00018000000180007A4DC2527B53C2D67A4F800000018000000180005555",
   42    "0006:AAAA000180000001800031A5CA287A31CA2849A5800000018000000180005555",
   43    "0007:AAAA000180000001800073D1CA1073D1CA1073DF800000018000000180005555",
   44    "0008:AAAA00018000000180001E3991401E3191081E71800000018000000180005555",
   45    "0009:AAAA000180000001800022F9A2203E21A2202221800000018000000180005555",
   46    "000A:AAAA000180000001800020F9A08020F9A0803E81800000018000000180005555",
   47    "000B:AAAA000180000001800022F9A220222194200821800000018000000180005555",
   48    "000C:AAAA00018000000180003EF9A0803EF9A0802081800000018000000180005555",
   49    "000D:AAAA00018000000180001EF1A08820F1A0901E89800000018000000180005555",
   50    "000E:AAAA00018000000180001E71A0881C8982883C71800000018000000180005555",
   51    "000F:AAAA00018000000180001EF9A0201C2182203CF9800000018000000180005555",
   52    "0010:AAAA0001800000018000391DA510251DA51039DD800000018000000180005555",
   53    "0011:AAAA00018000000180007189CA184A09CA08719D800000018000000180005555",
   54    "0012:AAAA00018000000180007199CA044A09CA10719D800000018000000180005555",
   55    "0013:AAAA00018000000180007199CA044A19CA047199800000018000000180005555",
   56    "0014:AAAA00018000000180007185CA0C4A15CA1C7185800000018000000180005555",
   57    "0015:AAAA00018000000180004993EA546A59DBD44A53800000018000000180005555",
   58    "0016:AAAA00018000000180003453C29A311789127113800000018000000180005555",
   59    "0017:AAAA00018000000180007BB9C1247939C1247939800000018000000180005555",
   60    "0018:AAAA00018000000180003325C4B447ADC4A434A5800000018000000180005555",
   61    "0019:AAAA00018000000180003E89A0D83EA9A0883E89800000018000000180005555",
   62    "001A:AAAA00018000000180003A5DC252325D8A52719D800000018000000180005555",
   63    "001B:AAAA000180000001800079CFC2107991C0507B8F800000018000000180005555",
   64    "001C:AAAA00018000000180001E7190801E61901010E1800000018000000180005555",
   65    "001D:AAAA00018000000180000E719080166192100EE1800000018000000180005555",
   66    "001E:AAAA00018000000180001C7192801C61941012E1800000018000000180005555",
   67    "001F:AAAA000180000001800012719280126192100CE1800000018000000180005555",
   68    "0020:00000000000000000000000000000000",
   69    "0021:00000000080808080808080008080000",
   70    "0022:00002222222200000000000000000000",
   71    "0023:000000001212127E24247E4848480000",
   72    "0024:00000000083E4948380E09493E080000",
   73    "0025:00000000314A4A340808162929460000",
   74    "0026:000000001C2222141829454246390000",
   75    "0027:00000808080800000000000000000000",
   76    "0028:00000004080810101010101008080400",
   77    "0029:00000020101008080808080810102000",
   78    "002A:00000000000008492A1C2A4908000000",
   79    "002B:0000000000000808087F080808000000",
   80    "002C:00000000000000000000000018080810",
   81    "002D:0000000000000000003C000000000000",
   82    "002E:00000000000000000000000018180000",
   83    "002F:00000000020204080810102040400000",
   84    "0030:00000000182442464A52624224180000",
   85    "0031:000000000818280808080808083E0000",
   86    "0032:000000003C4242020C102040407E0000",
   87    "0033:000000003C4242021C020242423C0000",
   88    "0034:00000000040C142444447E0404040000",
   89    "0035:000000007E4040407C020202423C0000",
   90    "0036:000000001C2040407C424242423C0000",
   91    "0037:000000007E0202040404080808080000",
   92    "0038:000000003C4242423C424242423C0000",
   93    "0039:000000003C4242423E02020204380000",
   94    "003A:00000000000018180000001818000000",
   95    "003B:00000000000018180000001808081000",
   96    "003C:00000000000204081020100804020000",
   97    "003D:000000000000007E0000007E00000000",
   98    "003E:00000000004020100804081020400000",
   99    "003F:000000003C4242020408080008080000",
  100    "0040:000000001C224A565252524E201E0000",
  101    "0041:0000000018242442427E424242420000",
  102    "0042:000000007C4242427C424242427C0000",
  103    "0043:000000003C42424040404042423C0000",
  104    "0044:00000000784442424242424244780000",
  105    "0045:000000007E4040407C404040407E0000",
  106    "0046:000000007E4040407C40404040400000",
  107    "0047:000000003C424240404E4242463A0000",
  108    "0048:00000000424242427E42424242420000",
  109    "0049:000000003E08080808080808083E0000",
  110    "004A:000000001F0404040404044444380000",
  111    "004B:00000000424448506060504844420000",
  112    "004C:000000004040404040404040407E0000",
  113    "004D:00000000424266665A5A424242420000",
  114    "004E:0000000042626252524A4A4646420000",
  115    "004F:000000003C42424242424242423C0000",
  116    "0050:000000007C4242427C40404040400000",
  117    "0051:000000003C4242424242425A663C0300",
  118    "0052:000000007C4242427C48444442420000",
  119    "0053:000000003C424240300C0242423C0000",
  120    "0054:000000007F0808080808080808080000",
  121    "0055:000000004242424242424242423C0000",
  122    "0056:00000000414141222222141408080000",
  123    "0057:00000000424242425A5A666642420000",
  124    "0058:00000000424224241818242442420000",
  125    "0059:00000000414122221408080808080000",
  126    "005A:000000007E02020408102040407E0000",
  127    "005B:0000000E080808080808080808080E00",
  128    "005C:00000000404020101008080402020000",
  129    "005D:00000070101010101010101010107000",
  130    "005E:00001824420000000000000000000000",
  131    "005F:00000000000000000000000000007F00",
  132    "0060:00201008000000000000000000000000",
  133    "0061:0000000000003C42023E4242463A0000",
  134    "0062:0000004040405C6242424242625C0000",
  135    "0063:0000000000003C4240404040423C0000",
  136    "0064:0000000202023A4642424242463A0000",
  137    "0065:0000000000003C42427E4040423C0000",
  138    "0066:0000000C1010107C1010101010100000",
  139    "0067:0000000000023A44444438203C42423C",
  140    "0068:0000004040405C624242424242420000",
  141    "0069:000000080800180808080808083E0000",
  142    "006A:0000000404000C040404040404044830",
  143    "006B:00000040404044485060504844420000",
  144    "006C:000000180808080808080808083E0000",
  145    "006D:00000000000076494949494949490000",
  146    "006E:0000000000005C624242424242420000",
  147    "006F:0000000000003C4242424242423C0000",
  148    "0070:0000000000005C6242424242625C4040",
  149    "0071:0000000000003A4642424242463A0202",
  150    "0072:0000000000005C624240404040400000",
  151    "0073:0000000000003C4240300C02423C0000",
  152    "0074:000000001010107C10101010100C0000",
  153    "0075:000000000000424242424242463A0000",
  154    "0076:00000000000042424224242418180000",
  155    "0077:00000000000041494949494949360000",
  156    "0078:00000000000042422418182442420000",
  157    "0079:0000000000004242424242261A02023C",
  158    "007A:0000000000007E0204081020407E0000",
  159    "007B:0000000C10100808102010080810100C",
  160    "007C:00000808080808080808080808080808",
  161    "007D:00000030080810100804081010080830",
  162    "007E:00000031494600000000000000000000",
  163    "007F:AAAA000180000001800073D1CA104BD1CA1073DF800000018000000180005555"
  164 };
  165 
  166 
  167 /*
  168    Array to hold ASCII bitmaps for chart title.  This
  169    will be created from the strings in ascii_hex[] above.
  170 */
  171 int ascii_bits[128][16];
  172 
  173 
  174 /*
  175    hexdigit contains 4x5 pixel arrays of tiny digits for legend.
  176    See unihexgen.c for more detailed description in comments.
  177 */
  178 char hexdigit[16][5] = {
  179    {0x6,0x9,0x9,0x9,0x6},  /* 0x0 */
  180    {0x2,0x6,0x2,0x2,0x7},  /* 0x1 */
  181    {0xF,0x1,0xF,0x8,0xF},  /* 0x2 */
  182    {0xE,0x1,0x7,0x1,0xE},  /* 0x3 */
  183    {0x9,0x9,0xF,0x1,0x1},  /* 0x4 */
  184    {0xF,0x8,0xF,0x1,0xF},  /* 0x5 */
  185    {0x6,0x8,0xE,0x9,0x6},  /* 0x6 */
  186    {0xF,0x1,0x2,0x4,0x4},  /* 0x7 */
  187    {0x6,0x9,0x6,0x9,0x6},  /* 0x8 */
  188    {0x6,0x9,0x7,0x1,0x6},  /* 0x9 */
  189    {0xF,0x9,0xF,0x9,0x9},  /* 0xA */
  190    {0xE,0x9,0xE,0x9,0xE},  /* 0xB */
  191    {0x7,0x8,0x8,0x8,0x7},  /* 0xC */
  192    {0xE,0x9,0x9,0x9,0xE},  /* 0xD */
  193    {0xF,0x8,0xE,0x8,0xF},  /* 0xE */
  194    {0xF,0x8,0xE,0x8,0x8}   /* 0xF */
  195 };
  196