/** \file
 * \brief Vector Text
 *
 * See Copyright Notice in cd.h
 */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>

#include "cd.h"
#include "wd.h"
#include "cd_private.h"


#define MULTILINE_MAXLEN   10240

typedef struct cdOperation
{
  char operation;
  signed char x, y;
} cdOperation;

typedef struct cdCaracter
{
  int right, center, operations;
  cdOperation *op;
} cdCaracter;

struct _cdVectorFont
{
  /* font data */
  char name[256];         /* font name */
  char file_name[10240];  /* font file name */
  cdCaracter *chars;      /* array of characters */
  int top,                /* from baseline to top */
      cap,                /* from baseline to cap (UNUSED) */
      half,               /* half between top and bottom (UNUSED) */
      bottom;             /* from baseline to bottom (negative) */

  /* attributes (independ from font) */
  double size_x, size_y;             /* internal font size */
  double current_cos, current_sin;   /* text direction */

  /* general transformation matrix */
  int text_transf;
  double text_matrix[6];

  cdCanvas* canvas;
};

static unsigned char vf_ansi2ascii[256] = {
     0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,  30,  31,  
    32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  
    64,  65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  
    96,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 
/* 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, */
   199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197, 201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 155, 156, 157, 158, 159,
/* 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, */
   225, 237, 243, 250, 241, 209, 170, 176, 191, 169, 166, 189, 188, 173, 174, 175, 167, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 172, 171, 190, 168, 
/* 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, */
   192, 193, 194, 195, 142, 143, 146, 128, 200, 144, 202, 203, 204, 205, 206, 207, 208, 165, 210, 211, 212, 213, 153, 215, 216, 217, 218, 219, 154, 221, 222, 223,
/* 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, */
   133, 160, 131, 227, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139, 240, 164, 149, 162, 147, 245, 148, 247, 248, 151, 163, 150, 129, 253, 254, 152
};

/******************************************************/
/* descricao do fonte default                         */
/******************************************************/

static int vf_default_top    = 28;
static int vf_default_cap    = 28;
static int vf_default_half   = 14;
static int vf_default_bottom = -7;

static cdOperation vf_default_char_33[] = {
{'m', 1, 21},
{'l', 1, 7},
{'m', 1, 2},
{'l', 0, 1},
{'l', 1, 0},
{'l', 2, 1},
{'l', 1, 2},
};
static cdOperation vf_default_char_34[] = {
{'m', 1, 21},
{'l', 0, 20},
{'l', 0, 14},
{'m', 1, 20},
{'l', 0, 14},
{'m', 1, 21},
{'l', 2, 20},
{'l', 0, 14},
{'m', 10, 21},
{'l', 9, 20},
{'l', 9, 14},
{'m', 10, 20},
{'l', 9, 14},
{'m', 10, 21},
{'l', 11, 20},
{'l', 9, 14},
};
static cdOperation vf_default_char_35[] = {
{'m', 8, 21},
{'l', 1, -7},
{'m', 14, 21},
{'l', 7, -7},
{'m', 1, 10},
{'l', 15, 10},
{'m', 0, 4},
{'l', 14, 4},
};
static cdOperation vf_default_char_36[] = {
{'m', 5, 25},
{'l', 5, -4},
{'m', 9, 25},
{'l', 9, -4},
{'m', 13, 18},
{'l', 12, 17},
{'l', 13, 16},
{'l', 14, 17},
{'l', 14, 18},
{'l', 12, 20},
{'l', 9, 21},
{'l', 5, 21},
{'l', 2, 20},
{'l', 0, 18},
{'l', 0, 16},
{'l', 1, 14},
{'l', 2, 13},
{'l', 4, 12},
{'l', 10, 10},
{'l', 12, 9},
{'l', 14, 7},
{'m', 0, 16},
{'l', 2, 14},
{'l', 4, 13},
{'l', 10, 11},
{'l', 12, 10},
{'l', 13, 9},
{'l', 14, 7},
{'l', 14, 3},
{'l', 12, 1},
{'l', 9, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 0, 3},
{'l', 0, 4},
{'l', 1, 5},
{'l', 2, 4},
{'l', 1, 3},
};
static cdOperation vf_default_char_37[] = {
{'m', 18, 21},
{'l', 0, 0},
{'m', 5, 21},
{'l', 7, 19},
{'l', 7, 17},
{'l', 6, 15},
{'l', 4, 14},
{'l', 2, 14},
{'l', 0, 16},
{'l', 0, 18},
{'l', 1, 20},
{'l', 3, 21},
{'l', 5, 21},
{'l', 7, 20},
{'l', 10, 19},
{'l', 13, 19},
{'l', 16, 20},
{'l', 18, 21},
{'m', 14, 7},
{'l', 12, 6},
{'l', 11, 4},
{'l', 11, 2},
{'l', 13, 0},
{'l', 15, 0},
{'l', 17, 1},
{'l', 18, 3},
{'l', 18, 5},
{'l', 16, 7},
{'l', 14, 7},
};
static cdOperation vf_default_char_38[] = {
{'m', 18, 13},
{'l', 17, 12},
{'l', 18, 11},
{'l', 19, 12},
{'l', 19, 13},
{'l', 18, 14},
{'l', 17, 14},
{'l', 16, 13},
{'l', 15, 11},
{'l', 13, 6},
{'l', 11, 3},
{'l', 9, 1},
{'l', 7, 0},
{'l', 4, 0},
{'l', 1, 1},
{'l', 0, 3},
{'l', 0, 6},
{'l', 1, 8},
{'l', 7, 12},
{'l', 9, 14},
{'l', 10, 16},
{'l', 10, 18},
{'l', 9, 20},
{'l', 7, 21},
{'l', 5, 20},
{'l', 4, 18},
{'l', 4, 16},
{'l', 5, 13},
{'l', 7, 10},
{'l', 12, 3},
{'l', 14, 1},
{'l', 17, 0},
{'l', 18, 0},
{'l', 19, 1},
{'l', 19, 2},
{'m', 4, 0},
{'l', 2, 1},
{'l', 1, 3},
{'l', 1, 6},
{'l', 2, 8},
{'l', 4, 10},
{'m', 4, 16},
{'l', 5, 14},
{'l', 13, 3},
{'l', 15, 1},
{'l', 17, 0},
};
static cdOperation vf_default_char_39[] = {
{'m', 1, 19},
{'l', 0, 20},
{'l', 1, 21},
{'l', 2, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 15},
};
static cdOperation vf_default_char_40[] = {
{'m', 7, 25},
{'l', 5, 23},
{'l', 3, 20},
{'l', 1, 16},
{'l', 0, 11},
{'l', 0, 7},
{'l', 1, 2},
{'l', 3, -2},
{'l', 5, -5},
{'l', 7, -7},
{'m', 5, 23},
{'l', 3, 19},
{'l', 2, 16},
{'l', 1, 11},
{'l', 1, 7},
{'l', 2, 2},
{'l', 3, -1},
{'l', 5, -5},
};
static cdOperation vf_default_char_41[] = {
{'m', 0, 25},
{'l', 2, 23},
{'l', 4, 20},
{'l', 6, 16},
{'l', 7, 11},
{'l', 7, 7},
{'l', 6, 2},
{'l', 4, -2},
{'l', 2, -5},
{'l', 0, -7},
{'m', 2, 23},
{'l', 4, 19},
{'l', 5, 16},
{'l', 6, 11},
{'l', 6, 7},
{'l', 5, 2},
{'l', 4, -1},
{'l', 2, -5},
};
static cdOperation vf_default_char_42[] = {
{'m', 5, 21},
{'l', 5, 9},
{'m', 0, 18},
{'l', 10, 12},
{'m', 10, 18},
{'l', 0, 12},
};
static cdOperation vf_default_char_43[] = {
{'m', 9, 18},
{'l', 9, 0},
{'m', 0, 9},
{'l', 18, 9},
};
static cdOperation vf_default_char_44[] = {
{'m', 2, 1},
{'l', 1, 0},
{'l', 0, 1},
{'l', 1, 2},
{'l', 2, 1},
{'l', 2, -1},
{'l', 1, -3},
{'l', 0, -4},
};
static cdOperation vf_default_char_45[] = {
{'m', 0, 9},
{'l', 18, 9},
};
static cdOperation vf_default_char_46[] = {
{'m', 1, 2},
{'l', 0, 1},
{'l', 1, 0},
{'l', 2, 1},
{'l', 1, 2},
};
static cdOperation vf_default_char_47[] = {
{'m', 0, -3},
{'l', 14, 21},
};
static cdOperation vf_default_char_48[] = {
{'m', 6, 21},
{'l', 3, 20},
{'l', 1, 17},
{'l', 0, 12},
{'l', 0, 9},
{'l', 1, 4},
{'l', 3, 1},
{'l', 6, 0},
{'l', 8, 0},
{'l', 11, 1},
{'l', 13, 4},
{'l', 14, 9},
{'l', 14, 12},
{'l', 13, 17},
{'l', 11, 20},
{'l', 8, 21},
{'l', 6, 21},
};
static cdOperation vf_default_char_49[] = {
{'m', 0, 17},
{'l', 2, 18},
{'l', 5, 21},
{'l', 5, 0},
};
static cdOperation vf_default_char_50[] = {
{'m', 1, 16},
{'l', 1, 17},
{'l', 2, 19},
{'l', 3, 20},
{'l', 5, 21},
{'l', 9, 21},
{'l', 11, 20},
{'l', 12, 19},
{'l', 13, 17},
{'l', 13, 15},
{'l', 12, 13},
{'l', 10, 10},
{'l', 0, 0},
{'l', 14, 0},
};
static cdOperation vf_default_char_51[] = {
{'m', 2, 21},
{'l', 13, 21},
{'l', 7, 13},
{'l', 10, 13},
{'l', 12, 12},
{'l', 13, 11},
{'l', 14, 8},
{'l', 14, 6},
{'l', 13, 3},
{'l', 11, 1},
{'l', 8, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 1, 2},
{'l', 0, 4},
};
static cdOperation vf_default_char_52[] = {
{'m', 10, 21},
{'l', 0, 7},
{'l', 15, 7},
{'m', 10, 21},
{'l', 10, 0},
};
static cdOperation vf_default_char_53[] = {
{'m', 12, 21},
{'l', 2, 21},
{'l', 1, 12},
{'l', 2, 13},
{'l', 5, 14},
{'l', 8, 14},
{'l', 11, 13},
{'l', 13, 11},
{'l', 14, 8},
{'l', 14, 6},
{'l', 13, 3},
{'l', 11, 1},
{'l', 8, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 1, 2},
{'l', 0, 4},
};
static cdOperation vf_default_char_54[] = {
{'m', 12, 18},
{'l', 11, 20},
{'l', 8, 21},
{'l', 6, 21},
{'l', 3, 20},
{'l', 1, 17},
{'l', 0, 12},
{'l', 0, 7},
{'l', 1, 3},
{'l', 3, 1},
{'l', 6, 0},
{'l', 7, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 7},
{'l', 12, 10},
{'l', 10, 12},
{'l', 7, 13},
{'l', 6, 13},
{'l', 3, 12},
{'l', 1, 10},
{'l', 0, 7},
};
static cdOperation vf_default_char_55[] = {
{'m', 14, 21},
{'l', 4, 0},
{'m', 0, 21},
{'l', 14, 21},
};
static cdOperation vf_default_char_56[] = {
{'m', 5, 21},
{'l', 2, 20},
{'l', 1, 18},
{'l', 1, 16},
{'l', 2, 14},
{'l', 4, 13},
{'l', 8, 12},
{'l', 11, 11},
{'l', 13, 9},
{'l', 14, 7},
{'l', 14, 4},
{'l', 13, 2},
{'l', 12, 1},
{'l', 9, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 1, 2},
{'l', 0, 4},
{'l', 0, 7},
{'l', 1, 9},
{'l', 3, 11},
{'l', 6, 12},
{'l', 10, 13},
{'l', 12, 14},
{'l', 13, 16},
{'l', 13, 18},
{'l', 12, 20},
{'l', 9, 21},
{'l', 5, 21},
};
static cdOperation vf_default_char_57[] = {
{'m', 13, 14},
{'l', 12, 11},
{'l', 10, 9},
{'l', 7, 8},
{'l', 6, 8},
{'l', 3, 9},
{'l', 1, 11},
{'l', 0, 14},
{'l', 0, 15},
{'l', 1, 18},
{'l', 3, 20},
{'l', 6, 21},
{'l', 7, 21},
{'l', 10, 20},
{'l', 12, 18},
{'l', 13, 14},
{'l', 13, 9},
{'l', 12, 4},
{'l', 10, 1},
{'l', 7, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 1, 3},
};
static cdOperation vf_default_char_58[] = {
{'m', 1, 14},
{'l', 0, 13},
{'l', 1, 12},
{'l', 2, 13},
{'l', 1, 14},
{'m', 1, 2},
{'l', 0, 1},
{'l', 1, 0},
{'l', 2, 1},
{'l', 1, 2},
};
static cdOperation vf_default_char_59[] = {
{'m', 1, 14},
{'l', 0, 13},
{'l', 1, 12},
{'l', 2, 13},
{'l', 1, 14},
{'m', 2, 1},
{'l', 1, 0},
{'l', 0, 1},
{'l', 1, 2},
{'l', 2, 1},
{'l', 2, -1},
{'l', 1, -3},
{'l', 0, -4},
};
static cdOperation vf_default_char_60[] = {
{'m', 16, 18},
{'l', 0, 9},
{'l', 16, 0},
};
static cdOperation vf_default_char_61[] = {
{'m', 0, 12},
{'l', 18, 12},
{'m', 0, 6},
{'l', 18, 6},
};
static cdOperation vf_default_char_62[] = {
{'m', 0, 18},
{'l', 16, 9},
{'l', 0, 0},
};
static cdOperation vf_default_char_63[] = {
{'m', 0, 16},
{'l', 0, 17},
{'l', 1, 19},
{'l', 2, 20},
{'l', 4, 21},
{'l', 8, 21},
{'l', 10, 20},
{'l', 11, 19},
{'l', 12, 17},
{'l', 12, 15},
{'l', 11, 13},
{'l', 10, 12},
{'l', 6, 10},
{'l', 6, 7},
{'m', 6, 2},
{'l', 5, 1},
{'l', 6, 0},
{'l', 7, 1},
{'l', 6, 2},
};
static cdOperation vf_default_char_64[] = {
{'m', 15, 13},
{'l', 14, 15},
{'l', 12, 16},
{'l', 9, 16},
{'l', 7, 15},
{'l', 6, 14},
{'l', 5, 11},
{'l', 5, 8},
{'l', 6, 6},
{'l', 8, 5},
{'l', 11, 5},
{'l', 13, 6},
{'l', 14, 8},
{'m', 9, 16},
{'l', 7, 14},
{'l', 6, 11},
{'l', 6, 8},
{'l', 7, 6},
{'l', 8, 5},
{'m', 15, 16},
{'l', 14, 8},
{'l', 14, 6},
{'l', 16, 5},
{'l', 18, 5},
{'l', 20, 7},
{'l', 21, 10},
{'l', 21, 12},
{'l', 20, 15},
{'l', 19, 17},
{'l', 17, 19},
{'l', 15, 20},
{'l', 12, 21},
{'l', 9, 21},
{'l', 6, 20},
{'l', 4, 19},
{'l', 2, 17},
{'l', 1, 15},
{'l', 0, 12},
{'l', 0, 9},
{'l', 1, 6},
{'l', 2, 4},
{'l', 4, 2},
{'l', 6, 1},
{'l', 9, 0},
{'l', 12, 0},
{'l', 15, 1},
{'l', 17, 2},
{'l', 18, 3},
{'m', 16, 16},
{'l', 15, 8},
{'l', 15, 6},
{'l', 16, 5},
};
static cdOperation vf_default_char_65[] = {
{'m', 16, 0},
{'l', 8, 21},
{'l', 0, 0},
{'m', 3, 7},
{'l', 13, 7},
};
static cdOperation vf_default_char_66[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 9, 21},
{'l', 12, 20},
{'l', 13, 19},
{'l', 14, 17},
{'l', 14, 15},
{'l', 13, 13},
{'l', 12, 12},
{'l', 9, 11},
{'m', 0, 11},
{'l', 9, 11},
{'l', 12, 10},
{'l', 13, 9},
{'l', 14, 7},
{'l', 14, 4},
{'l', 13, 2},
{'l', 12, 1},
{'l', 9, 0},
{'l', 0, 0},
};
static cdOperation vf_default_char_67[] = {
{'m', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
};
static cdOperation vf_default_char_68[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 7, 21},
{'l', 10, 20},
{'l', 12, 18},
{'l', 13, 16},
{'l', 14, 13},
{'l', 14, 8},
{'l', 13, 5},
{'l', 12, 3},
{'l', 10, 1},
{'l', 7, 0},
{'l', 0, 0},
};
static cdOperation vf_default_char_69[] = {
{'m', 13, 21},
{'l', 0, 21},
{'l', 0, 0},
{'l', 13, 0},
{'m', 0, 11},
{'l', 8, 11},
};
static cdOperation vf_default_char_70[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 13, 21},
{'m', 0, 11},
{'l', 8, 11},
};
static cdOperation vf_default_char_71[] = {
{'m', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 15, 8},
{'m', 10, 8},
{'l', 15, 8},
};
static cdOperation vf_default_char_72[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 14, 21},
{'l', 14, 0},
{'m', 0, 11},
{'l', 14, 11},
};
static cdOperation vf_default_char_73[] = {
{'m', 0, 21},
{'l', 0, 0},
};
static cdOperation vf_default_char_74[] = {
{'m', 10, 21},
{'l', 10, 5},
{'l', 9, 2},
{'l', 8, 1},
{'l', 6, 0},
{'l', 4, 0},
{'l', 2, 1},
{'l', 1, 2},
{'l', 0, 5},
{'l', 0, 7},
};
static cdOperation vf_default_char_75[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 14, 21},
{'l', 0, 7},
{'m', 5, 12},
{'l', 14, 0},
};
static cdOperation vf_default_char_76[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 0},
{'l', 12, 0},
};
static cdOperation vf_default_char_77[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 8, 0},
{'m', 16, 21},
{'l', 8, 0},
{'m', 16, 21},
{'l', 16, 0},
};
static cdOperation vf_default_char_78[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 14, 0},
{'m', 14, 21},
{'l', 14, 0},
};
static cdOperation vf_default_char_79[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
};
static cdOperation vf_default_char_80[] = {
{'m', 0, 10},
{'l', 9, 10},
{'l', 12, 11},
{'l', 13, 12},
{'l', 14, 14},
{'l', 14, 17},
{'l', 13, 19},
{'l', 12, 20},
{'l', 9, 21},
{'l', 0, 21},
{'l', 0, 0},
};
static cdOperation vf_default_char_81[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 9, 4},
{'l', 15, -2},
};
static cdOperation vf_default_char_82[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 9, 21},
{'l', 12, 20},
{'l', 13, 19},
{'l', 14, 17},
{'l', 14, 15},
{'l', 13, 13},
{'l', 12, 12},
{'l', 9, 11},
{'l', 0, 11},
{'m', 7, 11},
{'l', 14, 0},
};
static cdOperation vf_default_char_83[] = {
{'m', 14, 18},
{'l', 12, 20},
{'l', 9, 21},
{'l', 5, 21},
{'l', 2, 20},
{'l', 0, 18},
{'l', 0, 16},
{'l', 1, 14},
{'l', 2, 13},
{'l', 4, 12},
{'l', 10, 10},
{'l', 12, 9},
{'l', 13, 8},
{'l', 14, 6},
{'l', 14, 3},
{'l', 12, 1},
{'l', 9, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 0, 3},
};
static cdOperation vf_default_char_84[] = {
{'m', 7, 21},
{'l', 7, 0},
{'m', 0, 21},
{'l', 14, 21},
};
static cdOperation vf_default_char_85[] = {
{'m', 0, 21},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 6, 0},
{'l', 8, 0},
{'l', 11, 1},
{'l', 13, 3},
{'l', 14, 6},
{'l', 14, 21},
};
static cdOperation vf_default_char_86[] = {
{'m', 0, 21},
{'l', 8, 0},
{'m', 16, 21},
{'l', 8, 0},
};
static cdOperation vf_default_char_87[] = {
{'m', 0, 21},
{'l', 5, 0},
{'m', 10, 21},
{'l', 5, 0},
{'m', 10, 21},
{'l', 15, 0},
{'m', 20, 21},
{'l', 15, 0},
};
static cdOperation vf_default_char_88[] = {
{'m', 0, 21},
{'l', 14, 0},
{'m', 14, 21},
{'l', 0, 0},
};
static cdOperation vf_default_char_89[] = {
{'m', 0, 21},
{'l', 8, 11},
{'l', 8, 0},
{'m', 16, 21},
{'l', 8, 11},
};
static cdOperation vf_default_char_90[] = {
{'m', 14, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 14, 21},
{'m', 0, 0},
{'l', 14, 0},
};
static cdOperation vf_default_char_91[] = {
{'m', 0, 19},
{'l', 0, -1},
{'m', 1, 19},
{'l', 1, -1},
{'m', 0, 19},
{'l', 5, 19},
{'m', 0, -1},
{'l', 5, -1},
};
static cdOperation vf_default_char_92[] = {
{'m', 0, 21},
{'l', 14, -3},
};
static cdOperation vf_default_char_93[] = {
{'m', 4, 19},
{'l', 4, -1},
{'m', 5, 19},
{'l', 5, -1},
{'m', 0, 19},
{'l', 5, 19},
{'m', 0, -1},
{'l', 5, -1},
};
static cdOperation vf_default_char_94[] = {
{'m', 8, 18},
{'l', 3, 14},
{'l', 8, 19},
{'l', 13, 14},
{'l', 8, 18},
{'l', 8, 18},
};
static cdOperation vf_default_char_95[] = {
{'m', 0, -7},
{'l', 16, -7},
};
static cdOperation vf_default_char_96[] = {
{'m', 2, 21},
{'l', 1, 20},
{'l', 0, 18},
{'l', 0, 16},
{'l', 1, 15},
{'l', 2, 16},
{'l', 1, 17},
};
static cdOperation vf_default_char_97[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation vf_default_char_98[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 11},
{'l', 2, 13},
{'l', 4, 14},
{'l', 7, 14},
{'l', 9, 13},
{'l', 11, 11},
{'l', 12, 8},
{'l', 12, 6},
{'l', 11, 3},
{'l', 9, 1},
{'l', 7, 0},
{'l', 4, 0},
{'l', 2, 1},
{'l', 0, 3},
};
static cdOperation vf_default_char_99[] = {
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation vf_default_char_100[] = {
{'m', 12, 21},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation vf_default_char_101[] = {
{'m', 0, 8},
{'l', 12, 8},
{'l', 12, 10},
{'l', 11, 12},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation vf_default_char_102[] = {
{'m', 8, 21},
{'l', 6, 21},
{'l', 4, 20},
{'l', 3, 17},
{'l', 3, 0},
{'m', 0, 14},
{'l', 7, 14},
};
static cdOperation vf_default_char_103[] = {
{'m', 12, 14},
{'l', 12, -2},
{'l', 11, -5},
{'l', 10, -6},
{'l', 8, -7},
{'l', 5, -7},
{'l', 3, -6},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation vf_default_char_104[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 10},
{'l', 3, 13},
{'l', 5, 14},
{'l', 8, 14},
{'l', 10, 13},
{'l', 11, 10},
{'l', 11, 0},
};
static cdOperation vf_default_char_105[] = {
{'m', 2, 21},
{'l', 3, 20},
{'l', 4, 21},
{'l', 3, 22},
{'l', 2, 21},
{'m', 3, 14},
{'l', 3, 0},
};
static cdOperation vf_default_char_106[] = {
{'m', 4, 21},
{'l', 5, 20},
{'l', 6, 21},
{'l', 5, 22},
{'l', 4, 21},
{'m', 5, 14},
{'l', 5, -3},
{'l', 4, -6},
{'l', 2, -7},
{'l', 0, -7},
};
static cdOperation vf_default_char_107[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 10, 14},
{'l', 0, 4},
{'m', 4, 8},
{'l', 11, 0},
};
static cdOperation vf_default_char_108[] = {
{'m', 0, 21},
{'l', 0, 0},
};
static cdOperation vf_default_char_109[] = {
{'m', 0, 14},
{'l', 0, 0},
{'m', 0, 10},
{'l', 3, 13},
{'l', 5, 14},
{'l', 8, 14},
{'l', 10, 13},
{'l', 11, 10},
{'l', 11, 0},
{'m', 11, 10},
{'l', 14, 13},
{'l', 16, 14},
{'l', 19, 14},
{'l', 21, 13},
{'l', 22, 10},
{'l', 22, 0},
};
static cdOperation vf_default_char_110[] = {
{'m', 0, 14},
{'l', 0, 0},
{'m', 0, 10},
{'l', 3, 13},
{'l', 5, 14},
{'l', 8, 14},
{'l', 10, 13},
{'l', 11, 10},
{'l', 11, 0},
};
static cdOperation vf_default_char_111[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
};
static cdOperation vf_default_char_112[] = {
{'m', 0, 14},
{'l', 0, -7},
{'m', 0, 11},
{'l', 2, 13},
{'l', 4, 14},
{'l', 7, 14},
{'l', 9, 13},
{'l', 11, 11},
{'l', 12, 8},
{'l', 12, 6},
{'l', 11, 3},
{'l', 9, 1},
{'l', 7, 0},
{'l', 4, 0},
{'l', 2, 1},
{'l', 0, 3},
};
static cdOperation vf_default_char_113[] = {
{'m', 12, 14},
{'l', 12, -7},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation vf_default_char_114[] = {
{'m', 0, 14},
{'l', 0, 0},
{'m', 0, 8},
{'l', 1, 11},
{'l', 3, 13},
{'l', 5, 14},
{'l', 8, 14},
};
static cdOperation vf_default_char_115[] = {
{'m', 11, 11},
{'l', 10, 13},
{'l', 7, 14},
{'l', 4, 14},
{'l', 1, 13},
{'l', 0, 11},
{'l', 1, 9},
{'l', 3, 8},
{'l', 8, 7},
{'l', 10, 6},
{'l', 11, 4},
{'l', 11, 3},
{'l', 10, 1},
{'l', 7, 0},
{'l', 4, 0},
{'l', 1, 1},
{'l', 0, 3},
};
static cdOperation vf_default_char_116[] = {
{'m', 3, 21},
{'l', 3, 4},
{'l', 4, 1},
{'l', 6, 0},
{'l', 8, 0},
{'m', 0, 14},
{'l', 7, 14},
};
static cdOperation vf_default_char_117[] = {
{'m', 0, 14},
{'l', 0, 4},
{'l', 1, 1},
{'l', 3, 0},
{'l', 6, 0},
{'l', 8, 1},
{'l', 11, 4},
{'m', 11, 14},
{'l', 11, 0},
};
static cdOperation vf_default_char_118[] = {
{'m', 0, 14},
{'l', 6, 0},
{'m', 12, 14},
{'l', 6, 0},
};
static cdOperation vf_default_char_119[] = {
{'m', 0, 14},
{'l', 4, 0},
{'m', 8, 14},
{'l', 4, 0},
{'m', 8, 14},
{'l', 12, 0},
{'m', 16, 14},
{'l', 12, 0},
};
static cdOperation vf_default_char_120[] = {
{'m', 0, 14},
{'l', 11, 0},
{'m', 11, 14},
{'l', 0, 0},
};
static cdOperation vf_default_char_121[] = {
{'m', 1, 14},
{'l', 7, 0},
{'m', 13, 14},
{'l', 7, 0},
{'l', 5, -4},
{'l', 3, -6},
{'l', 1, -7},
{'l', 0, -7},
};
static cdOperation vf_default_char_122[] = {
{'m', 11, 14},
{'l', 0, 0},
{'m', 0, 14},
{'l', 11, 14},
{'m', 0, 0},
{'l', 11, 0},
};
static cdOperation vf_default_char_123[] = {
{'m', 5, 25},
{'l', 3, 24},
{'l', 2, 23},
{'l', 1, 21},
{'l', 1, 19},
{'l', 2, 17},
{'l', 3, 16},
{'l', 4, 14},
{'l', 4, 12},
{'l', 2, 10},
{'m', 3, 24},
{'l', 2, 22},
{'l', 2, 20},
{'l', 3, 18},
{'l', 4, 17},
{'l', 5, 15},
{'l', 5, 13},
{'l', 4, 11},
{'l', 0, 9},
{'l', 4, 7},
{'l', 5, 5},
{'l', 5, 3},
{'l', 4, 1},
{'l', 3, 0},
{'l', 2, -2},
{'l', 2, -4},
{'l', 3, -6},
{'m', 2, 8},
{'l', 4, 6},
{'l', 4, 4},
{'l', 3, 2},
{'l', 2, 1},
{'l', 1, -1},
{'l', 1, -3},
{'l', 2, -5},
{'l', 3, -6},
{'l', 5, -7},
};
static cdOperation vf_default_char_124[] = {
{'m', 0, 21},
{'l', 0, 0},
};
static cdOperation vf_default_char_125[] = {
{'m', 0, 25},
{'l', 2, 24},
{'l', 3, 23},
{'l', 4, 21},
{'l', 4, 19},
{'l', 3, 17},
{'l', 2, 16},
{'l', 1, 14},
{'l', 1, 12},
{'l', 3, 10},
{'m', 2, 24},
{'l', 3, 22},
{'l', 3, 20},
{'l', 2, 18},
{'l', 1, 17},
{'l', 0, 15},
{'l', 0, 13},
{'l', 1, 11},
{'l', 5, 9},
{'l', 1, 7},
{'l', 0, 5},
{'l', 0, 3},
{'l', 1, 1},
{'l', 2, 0},
{'l', 3, -2},
{'l', 3, -4},
{'l', 2, -6},
{'m', 3, 8},
{'l', 1, 6},
{'l', 1, 4},
{'l', 2, 2},
{'l', 3, 1},
{'l', 4, -1},
{'l', 4, -3},
{'l', 3, -5},
{'l', 2, -6},
{'l', 0, -7},
};
static cdOperation vf_default_char_126[] = {
{'m', 0, 16},
{'l', 5, 19},
{'l', 9, 16},
{'l', 13, 18},
};
static cdOperation vf_default_char_127[] = {
{'m', 0, 7},
{'l', 0, 0},
{'l', 12, 0},
{'l', 12, 7},
{'l', 6, 16},
{'l', 0, 7},
{'m', 6, 6},
{'l', 6, 6},
};
static cdOperation vf_default_char_128[] = {
{'m', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'m', 8, 0},
{'l', 8, -1},
{'l', 7, -1},
{'l', 7, 0},
{'m', 3, -4},
{'l', 3, -6},
{'l', 4, -7},
{'l', 10, -7},
{'l', 12, -5},
{'l', 12, -4},
{'l', 10, -2},
{'l', 8, -1},
};
static cdOperation vf_default_char_129[] = {
{'m', 0, 14},
{'l', 0, 4},
{'l', 1, 1},
{'l', 3, 0},
{'l', 6, 0},
{'l', 8, 1},
{'l', 11, 4},
{'m', 11, 14},
{'l', 11, 0},
{'m', 2, 19},
{'l', 1, 18},
{'l', 2, 17},
{'l', 3, 18},
{'l', 2, 19},
{'m', 10, 19},
{'l', 9, 18},
{'l', 10, 17},
{'l', 11, 18},
{'l', 10, 19},
};
static cdOperation vf_default_char_130[] = {
{'m', 0, 8},
{'l', 12, 8},
{'l', 12, 10},
{'l', 11, 12},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 10, 22},
{'l', 5, 17},
};
static cdOperation vf_default_char_131[] = {
{'m', 13, 14},
{'l', 13, 0},
{'m', 13, 11},
{'l', 11, 13},
{'l', 9, 14},
{'l', 6, 14},
{'l', 4, 13},
{'l', 2, 11},
{'l', 1, 8},
{'l', 1, 6},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 9, 0},
{'l', 11, 1},
{'l', 13, 3},
{'m', 3, 16},
{'l', 8, 21},
{'l', 13, 16},
};
static cdOperation vf_default_char_132[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 2, 19},
{'l', 1, 18},
{'l', 2, 17},
{'l', 3, 18},
{'l', 2, 19},
{'m', 10, 19},
{'l', 9, 18},
{'l', 10, 17},
{'l', 11, 18},
{'l', 10, 19},
};
static cdOperation vf_default_char_133[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 3, 22},
{'l', 8, 17},
};
static cdOperation vf_default_char_134[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 5, 19},
{'l', 4, 18},
{'l', 5, 17},
{'l', 7, 17},
{'l', 8, 18},
{'l', 7, 19},
{'l', 5, 19},
};
static cdOperation vf_default_char_135[] = {
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 6, 0},
{'l', 6, -1},
{'l', 9, -2},
{'l', 10, -5},
{'l', 8, -7},
{'l', 4, -7},
{'l', 3, -5},
};
static cdOperation vf_default_char_136[] = {
{'m', 2, 8},
{'l', 14, 8},
{'l', 14, 10},
{'l', 13, 12},
{'l', 12, 13},
{'l', 10, 14},
{'l', 7, 14},
{'l', 5, 13},
{'l', 3, 11},
{'l', 2, 8},
{'l', 2, 6},
{'l', 3, 3},
{'l', 5, 1},
{'l', 7, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'m', 4, 16},
{'l', 9, 21},
{'l', 14, 16},
};
static cdOperation vf_default_char_137[] = {
{'m', 0, 8},
{'l', 12, 8},
{'l', 12, 10},
{'l', 11, 12},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 3, 19},
{'l', 2, 18},
{'l', 3, 17},
{'l', 4, 18},
{'l', 3, 19},
{'m', 11, 19},
{'l', 10, 18},
{'l', 11, 17},
{'l', 12, 18},
{'l', 11, 19},
};
static cdOperation vf_default_char_138[] = {
{'m', 0, 8},
{'l', 12, 8},
{'l', 12, 10},
{'l', 11, 12},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 2, 22},
{'l', 7, 17},
};
static cdOperation vf_default_char_139[] = {
{'m', 5, 14},
{'l', 5, 0},
{'m', 1, 19},
{'l', 0, 18},
{'l', 1, 17},
{'l', 2, 18},
{'l', 1, 19},
{'m', 9, 19},
{'l', 8, 18},
{'l', 9, 17},
{'l', 10, 18},
{'l', 9, 19},
};
static cdOperation vf_default_char_140[] = {
{'m', 8, 14},
{'l', 8, 0},
{'m', 3, 16},
{'l', 8, 21},
{'l', 13, 16},
};
static cdOperation vf_default_char_141[] = {
{'m', 5, 14},
{'l', 5, 0},
{'m', 0, 22},
{'l', 5, 17},
};
static cdOperation vf_default_char_142[] = {
{'m', 16, 0},
{'l', 8, 21},
{'l', 0, 0},
{'m', 3, 7},
{'l', 13, 7},
{'m', 4, 26},
{'l', 3, 25},
{'l', 4, 24},
{'l', 5, 25},
{'l', 4, 26},
{'m', 12, 26},
{'l', 11, 25},
{'l', 12, 24},
{'l', 13, 25},
{'l', 12, 26},
};
static cdOperation vf_default_char_143[] = {
{'m', 16, 0},
{'l', 8, 21},
{'l', 0, 0},
{'m', 3, 7},
{'l', 13, 7},
{'m', 7, 26},
{'l', 6, 25},
{'l', 7, 24},
{'l', 9, 24},
{'l', 10, 25},
{'l', 9, 26},
{'l', 7, 26},
};
static cdOperation vf_default_char_144[] = {
{'m', 13, 21},
{'l', 0, 21},
{'l', 0, 0},
{'l', 13, 0},
{'m', 0, 11},
{'l', 8, 11},
{'m', 10, 28},
{'l', 5, 23},
};
static cdOperation vf_default_char_145[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 17, 14},
{'l', 20, 14},
{'l', 22, 13},
{'l', 23, 12},
{'l', 24, 10},
{'l', 24, 8},
{'l', 12, 8},
{'l', 13, 11},
{'l', 15, 13},
{'l', 17, 14},
{'m', 12, 6},
{'l', 13, 3},
{'l', 15, 1},
{'l', 17, 0},
{'l', 20, 0},
{'l', 22, 1},
{'l', 24, 3},
};
static cdOperation vf_default_char_146[] = {
{'m', 23, 21},
{'l', 8, 21},
{'l', 0, 0},
{'m', 10, 21},
{'l', 10, 0},
{'l', 23, 0},
{'m', 10, 11},
{'l', 18, 11},
{'m', 3, 7},
{'l', 10, 7},
};
static cdOperation vf_default_char_147[] = {
{'m', 6, 14},
{'l', 4, 13},
{'l', 2, 11},
{'l', 1, 8},
{'l', 1, 6},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 9, 0},
{'l', 11, 1},
{'l', 13, 3},
{'l', 14, 6},
{'l', 14, 8},
{'l', 13, 11},
{'l', 11, 13},
{'l', 9, 14},
{'l', 6, 14},
{'m', 3, 16},
{'l', 8, 21},
{'l', 13, 16},
};
static cdOperation vf_default_char_148[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 3, 19},
{'l', 2, 18},
{'l', 3, 17},
{'l', 4, 18},
{'l', 3, 19},
{'m', 11, 19},
{'l', 10, 18},
{'l', 11, 17},
{'l', 12, 18},
{'l', 11, 19},
};
static cdOperation vf_default_char_149[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 2, 22},
{'l', 7, 17},
};
static cdOperation vf_default_char_150[] = {
{'m', 2, 14},
{'l', 2, 4},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 13, 4},
{'m', 13, 14},
{'l', 13, 0},
{'m', 3, 17},
{'l', 8, 22},
{'l', 13, 17},
};
static cdOperation vf_default_char_151[] = {
{'m', 0, 14},
{'l', 0, 4},
{'l', 1, 1},
{'l', 3, 0},
{'l', 6, 0},
{'l', 8, 1},
{'l', 11, 4},
{'m', 11, 14},
{'l', 11, 0},
{'m', 1, 22},
{'l', 6, 17},
};
static cdOperation vf_default_char_152[] = {
{'m', 1, 14},
{'l', 7, 0},
{'l', 5, -4},
{'l', 3, -6},
{'l', 1, -7},
{'l', 0, -7},
{'m', 13, 14},
{'l', 7, 0},
{'m', 3, 19},
{'l', 2, 18},
{'l', 3, 17},
{'l', 4, 18},
{'l', 3, 19},
{'m', 11, 19},
{'l', 10, 18},
{'l', 11, 17},
{'l', 12, 18},
{'l', 11, 19},
};
static cdOperation vf_default_char_153[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 4, 26},
{'l', 3, 25},
{'l', 4, 24},
{'l', 5, 25},
{'l', 4, 26},
{'m', 12, 26},
{'l', 11, 25},
{'l', 12, 24},
{'l', 13, 25},
{'l', 12, 26},
};
static cdOperation vf_default_char_154[] = {
{'m', 0, 21},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 6, 0},
{'l', 8, 0},
{'l', 11, 1},
{'l', 13, 3},
{'l', 14, 6},
{'l', 14, 21},
{'m', 3, 26},
{'l', 2, 25},
{'l', 3, 24},
{'l', 4, 25},
{'l', 3, 26},
{'m', 11, 26},
{'l', 10, 25},
{'l', 11, 24},
{'l', 12, 25},
{'l', 11, 26},
};
static cdOperation vf_default_char_155[] = {
{'m', 12, 15},
{'l', 10, 17},
{'l', 8, 18},
{'l', 5, 18},
{'l', 3, 17},
{'l', 1, 15},
{'l', 0, 12},
{'l', 0, 10},
{'l', 1, 7},
{'l', 3, 5},
{'l', 5, 4},
{'l', 8, 4},
{'l', 10, 5},
{'l', 12, 7},
{'m', 6, 0},
{'l', 6, 22},
};
static cdOperation vf_default_char_156[] = {
{'m', 13, 20},
{'l', 10, 21},
{'l', 8, 21},
{'l', 5, 20},
{'l', 4, 19},
{'l', 3, 16},
{'l', 3, 0},
{'l', 12, 0},
{'l', 15, 1},
{'l', 15, 2},
{'m', 0, 12},
{'l', 7, 12},
};
static cdOperation vf_default_char_157[] = {
{'m', 0, 21},
{'l', 8, 11},
{'l', 8, 0},
{'m', 16, 21},
{'l', 8, 11},
{'m', 4, 11},
{'l', 13, 11},
{'m', 4, 8},
{'l', 13, 8},
};
static cdOperation vf_default_char_158[] = {
{'m', 0, 10},
{'l', 9, 10},
{'l', 12, 11},
{'l', 13, 12},
{'l', 14, 14},
{'l', 14, 17},
{'l', 13, 19},
{'l', 12, 20},
{'l', 9, 21},
{'l', 0, 21},
{'l', 0, 0},
{'m', 12, 8},
{'l', 18, 8},
{'m', 15, 12},
{'l', 15, 2},
{'l', 16, 0},
{'l', 18, 0},
{'l', 19, 1},
};
static cdOperation vf_default_char_159[] = {
{'m', 0, 21},
{'l', 8, 11},
{'l', 8, 0},
{'m', 16, 21},
{'l', 8, 11},
{'m', 4, 25},
{'l', 3, 24},
{'l', 4, 23},
{'l', 5, 24},
{'l', 4, 25},
{'m', 12, 25},
{'l', 11, 24},
{'l', 12, 23},
{'l', 13, 24},
{'l', 12, 25},
};
static cdOperation vf_default_char_160[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 10, 22},
{'l', 5, 17},
};
static cdOperation vf_default_char_161[] = {
{'m', 3, 14},
{'l', 3, 0},
{'m', 7, 22},
{'l', 2, 17},
};
static cdOperation vf_default_char_162[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 11, 22},
{'l', 6, 17},
};
static cdOperation vf_default_char_163[] = {
{'m', 0, 14},
{'l', 0, 4},
{'l', 1, 1},
{'l', 3, 0},
{'l', 6, 0},
{'l', 8, 1},
{'l', 11, 4},
{'m', 11, 14},
{'l', 11, 0},
{'m', 9, 22},
{'l', 4, 17},
};
static cdOperation vf_default_char_164[] = {
{'m', 0, 14},
{'l', 0, 0},
{'m', 0, 10},
{'l', 3, 13},
{'l', 5, 14},
{'l', 8, 14},
{'l', 10, 13},
{'l', 11, 10},
{'l', 11, 0},
{'m', 0, 17},
{'l', 5, 20},
{'l', 9, 17},
{'l', 13, 19},
};
static cdOperation vf_default_char_165[] = {
{'m', 14, 21},
{'l', 14, 0},
{'l', 0, 21},
{'l', 0, 0},
{'m', 0, 24},
{'l', 5, 27},
{'l', 9, 24},
{'l', 13, 26},
};
static cdOperation vf_default_char_166[] = {
{'m', 12, 21},
{'l', 12, 7},
{'m', 12, 18},
{'l', 10, 20},
{'l', 8, 21},
{'l', 5, 21},
{'l', 3, 20},
{'l', 1, 18},
{'l', 0, 15},
{'l', 0, 13},
{'l', 1, 10},
{'l', 3, 8},
{'l', 5, 7},
{'l', 8, 7},
{'l', 10, 8},
{'l', 12, 10},
{'m', 0, 0},
{'l', 12, 0},
};
static cdOperation vf_default_char_167[] = {
{'m', 0, 15},
{'l', 1, 12},
{'l', 3, 10},
{'l', 5, 9},
{'l', 8, 9},
{'l', 10, 10},
{'l', 12, 12},
{'l', 13, 15},
{'l', 12, 18},
{'l', 10, 20},
{'l', 8, 21},
{'l', 5, 21},
{'l', 3, 20},
{'l', 1, 18},
{'l', 0, 15},
{'m', 0, 0},
{'l', 13, 0},
};
static cdOperation vf_default_char_168[] = {
{'m', 12, 5},
{'l', 12, 4},
{'l', 11, 2},
{'l', 10, 1},
{'l', 8, 0},
{'l', 4, 0},
{'l', 2, 1},
{'l', 1, 2},
{'l', 0, 4},
{'l', 0, 6},
{'l', 1, 8},
{'l', 2, 9},
{'l', 6, 11},
{'l', 6, 14},
{'m', 6, 19},
{'l', 7, 20},
{'l', 6, 21},
{'l', 5, 20},
{'l', 6, 19},
};
static cdOperation vf_default_char_169[] = {
{'m', 0, 0},
{'l', 0, 8},
{'l', 12, 8},
{'l', 12, 5},
{'l', 3, 5},
{'l', 3, 0},
{'l', 0, 0},
};
static cdOperation vf_default_char_170[] = {
{'m', 12, 0},
{'l', 12, 8},
{'l', 0, 8},
{'l', 0, 5},
{'l', 9, 5},
{'l', 9, 0},
{'l', 12, 0},
};
static cdOperation vf_default_char_171[] = {
{'m', 0, 18},
{'l', 3, 21},
{'l', 4, 21},
{'l', 4, 12},
{'m', 9, 6},
{'l', 9, 7},
{'l', 11, 9},
{'l', 15, 9},
{'l', 16, 7},
{'l', 16, 5},
{'l', 15, 4},
{'l', 9, 0},
{'l', 16, 0},
{'m', 15, 21},
{'l', 1, 0},
};
static cdOperation vf_default_char_172[] = {
{'m', 0, 18},
{'l', 3, 21},
{'l', 4, 21},
{'l', 4, 12},
{'m', 15, 21},
{'l', 1, 0},
{'m', 15, 3},
{'l', 7, 3},
{'l', 13, 9},
{'l', 13, 0},
};
static cdOperation vf_default_char_173[] = {
{'m', 1, 0},
{'l', 1, 14},
{'m', 1, 19},
{'l', 0, 20},
{'l', 1, 21},
{'l', 2, 20},
{'l', 1, 19},
};
static cdOperation vf_default_char_174[] = {
{'m', 7, 17},
{'l', 0, 11},
{'l', 7, 5},
{'m', 15, 17},
{'l', 8, 11},
{'l', 15, 5},
};
static cdOperation vf_default_char_175[] = {
{'m', 8, 17},
{'l', 15, 11},
{'l', 8, 5},
{'m', 0, 17},
{'l', 7, 11},
{'l', 0, 5},
};
static cdOperation vf_default_char_176[] = {
{'m', 4, 21},
{'l', 6, 21},
{'l', 6, 19},
{'l', 4, 19},
{'l', 4, 21},
{'m', 5, 21},
{'l', 5, 19},
{'m', 4, 15},
{'l', 6, 15},
{'l', 6, 13},
{'l', 4, 13},
{'l', 4, 15},
{'m', 5, 15},
{'l', 5, 13},
{'m', 4, 9},
{'l', 6, 9},
{'l', 6, 7},
{'l', 4, 7},
{'l', 4, 9},
{'m', 5, 9},
{'l', 5, 7},
{'m', 4, 3},
{'l', 6, 3},
{'l', 6, 1},
{'l', 4, 1},
{'l', 4, 3},
{'m', 5, 3},
{'l', 5, 1},
{'m', 0, 18},
{'l', 2, 18},
{'l', 2, 16},
{'l', 0, 16},
{'l', 0, 18},
{'m', 1, 18},
{'l', 1, 16},
{'m', 0, 12},
{'l', 2, 12},
{'l', 2, 10},
{'l', 0, 10},
{'l', 0, 12},
{'m', 1, 12},
{'l', 1, 10},
{'m', 0, 6},
{'l', 2, 6},
{'l', 2, 4},
{'l', 0, 4},
{'l', 0, 6},
{'m', 1, 6},
{'l', 1, 4},
{'m', 0, 0},
{'l', 2, 0},
{'l', 2, -2},
{'l', 0, -2},
{'l', 0, 0},
{'m', 1, 0},
{'l', 1, -2},
{'m', 8, 18},
{'l', 10, 18},
{'l', 10, 16},
{'l', 8, 16},
{'l', 8, 18},
{'m', 9, 18},
{'l', 9, 16},
{'m', 8, 12},
{'l', 10, 12},
{'l', 10, 10},
{'l', 8, 10},
{'l', 8, 12},
{'m', 9, 12},
{'l', 9, 10},
{'m', 8, 6},
{'l', 10, 6},
{'l', 10, 4},
{'l', 8, 4},
{'l', 8, 6},
{'m', 9, 6},
{'l', 9, 4},
{'m', 8, 0},
{'l', 10, 0},
{'l', 10, -2},
{'l', 8, -2},
{'l', 8, 0},
{'m', 9, 0},
{'l', 9, -2},
{'m', 12, 21},
{'l', 14, 21},
{'l', 14, 19},
{'l', 12, 19},
{'l', 12, 21},
{'m', 13, 21},
{'l', 13, 19},
{'m', 12, 15},
{'l', 14, 15},
{'l', 14, 13},
{'l', 12, 13},
{'l', 12, 15},
{'m', 13, 15},
{'l', 13, 13},
{'m', 12, 9},
{'l', 14, 9},
{'l', 14, 7},
{'l', 12, 7},
{'l', 12, 9},
{'m', 13, 9},
{'l', 13, 7},
{'m', 12, 3},
{'l', 14, 3},
{'l', 14, 1},
{'l', 12, 1},
{'l', 12, 3},
{'m', 13, 3},
{'l', 13, 1},
{'m', 3, -3},
{'l', 3, -5},
{'l', 5, -5},
{'l', 5, -3},
{'l', 3, -3},
{'m', 4, -3},
{'l', 4, -5},
{'m', 12, -3},
{'l', 12, -5},
{'l', 14, -5},
{'l', 14, -3},
{'l', 12, -3},
{'m', 13, -3},
{'l', 13, -5},
};
static cdOperation vf_default_char_177[] = {
{'m', 0, 18},
{'l', 2, 18},
{'l', 2, 16},
{'l', 0, 16},
{'l', 0, 18},
{'m', 1, 18},
{'l', 1, 16},
{'m', 0, 12},
{'l', 2, 12},
{'l', 2, 10},
{'l', 0, 10},
{'l', 0, 12},
{'m', 1, 12},
{'l', 1, 10},
{'m', 0, 6},
{'l', 2, 6},
{'l', 2, 4},
{'l', 0, 4},
{'l', 0, 6},
{'m', 1, 6},
{'l', 1, 4},
{'m', 0, 0},
{'l', 2, 0},
{'l', 2, -2},
{'l', 0, -2},
{'l', 0, 0},
{'m', 1, 0},
{'l', 1, -2},
{'m', 2, 21},
{'l', 4, 21},
{'l', 4, 19},
{'l', 2, 19},
{'l', 2, 21},
{'m', 3, 21},
{'l', 3, 19},
{'m', 2, 15},
{'l', 4, 15},
{'l', 4, 13},
{'l', 2, 13},
{'l', 2, 15},
{'m', 3, 15},
{'l', 3, 13},
{'m', 2, 9},
{'l', 4, 9},
{'l', 4, 7},
{'l', 2, 7},
{'l', 2, 9},
{'m', 3, 9},
{'l', 3, 7},
{'m', 2, 3},
{'l', 4, 3},
{'l', 4, 1},
{'l', 2, 1},
{'l', 2, 3},
{'m', 3, 3},
{'l', 3, 1},
{'m', 4, 18},
{'l', 6, 18},
{'l', 6, 16},
{'l', 4, 16},
{'l', 4, 18},
{'m', 5, 18},
{'l', 5, 16},
{'m', 4, 12},
{'l', 6, 12},
{'l', 6, 10},
{'l', 4, 10},
{'l', 4, 12},
{'m', 5, 12},
{'l', 5, 10},
{'m', 4, 6},
{'l', 6, 6},
{'l', 6, 4},
{'l', 4, 4},
{'l', 4, 6},
{'m', 5, 6},
{'l', 5, 4},
{'m', 4, 0},
{'l', 6, 0},
{'l', 6, -2},
{'l', 4, -2},
{'l', 4, 0},
{'m', 5, 0},
{'l', 5, -2},
{'m', 6, 21},
{'l', 8, 21},
{'l', 8, 19},
{'l', 6, 19},
{'l', 6, 21},
{'m', 7, 21},
{'l', 7, 19},
{'m', 6, 15},
{'l', 8, 15},
{'l', 8, 13},
{'l', 6, 13},
{'l', 6, 15},
{'m', 7, 15},
{'l', 7, 13},
{'m', 6, 9},
{'l', 8, 9},
{'l', 8, 7},
{'l', 6, 7},
{'l', 6, 9},
{'m', 7, 9},
{'l', 7, 7},
{'m', 6, 3},
{'l', 8, 3},
{'l', 8, 1},
{'l', 6, 1},
{'l', 6, 3},
{'m', 7, 3},
{'l', 7, 1},
{'m', 8, 18},
{'l', 10, 18},
{'l', 10, 16},
{'l', 8, 16},
{'l', 8, 18},
{'m', 9, 18},
{'l', 9, 16},
{'m', 8, 12},
{'l', 10, 12},
{'l', 10, 10},
{'l', 8, 10},
{'l', 8, 12},
{'m', 9, 12},
{'l', 9, 10},
{'m', 8, 6},
{'l', 10, 6},
{'l', 10, 4},
{'l', 8, 4},
{'l', 8, 6},
{'m', 9, 6},
{'l', 9, 4},
{'m', 8, 0},
{'l', 10, 0},
{'l', 10, -2},
{'l', 8, -2},
{'l', 8, 0},
{'m', 9, 0},
{'l', 9, -2},
{'m', 10, 21},
{'l', 12, 21},
{'l', 12, 19},
{'l', 10, 19},
{'l', 10, 21},
{'m', 11, 21},
{'l', 11, 19},
{'m', 10, 15},
{'l', 12, 15},
{'l', 12, 13},
{'l', 10, 13},
{'l', 10, 15},
{'m', 11, 15},
{'l', 11, 13},
{'m', 10, 9},
{'l', 12, 9},
{'l', 12, 7},
{'l', 10, 7},
{'l', 10, 9},
{'m', 11, 9},
{'l', 11, 7},
{'m', 10, 3},
{'l', 12, 3},
{'l', 12, 1},
{'l', 10, 1},
{'l', 10, 3},
{'m', 11, 3},
{'l', 11, 1},
{'m', 12, 18},
{'l', 14, 18},
{'l', 14, 16},
{'l', 12, 16},
{'l', 12, 18},
{'m', 13, 18},
{'l', 13, 16},
{'m', 12, 12},
{'l', 14, 12},
{'l', 14, 10},
{'l', 12, 10},
{'l', 12, 12},
{'m', 13, 12},
{'l', 13, 10},
{'m', 12, 6},
{'l', 14, 6},
{'l', 14, 4},
{'l', 12, 4},
{'l', 12, 6},
{'m', 13, 6},
{'l', 13, 4},
{'m', 12, 0},
{'l', 14, 0},
{'l', 14, -2},
{'l', 12, -2},
{'l', 12, 0},
{'m', 13, 0},
{'l', 13, -2},
{'m', 14, 21},
{'l', 16, 21},
{'l', 16, 19},
{'l', 14, 19},
{'l', 14, 21},
{'m', 15, 21},
{'l', 15, 19},
{'m', 14, 15},
{'l', 16, 15},
{'l', 16, 13},
{'l', 14, 13},
{'l', 14, 15},
{'m', 15, 15},
{'l', 15, 13},
{'m', 14, 9},
{'l', 16, 9},
{'l', 16, 7},
{'l', 14, 7},
{'l', 14, 9},
{'m', 15, 9},
{'l', 15, 7},
{'m', 14, 3},
{'l', 16, 3},
{'l', 16, 1},
{'l', 14, 1},
{'l', 14, 3},
{'m', 15, 3},
{'l', 15, 1},
{'m', 2, -3},
{'l', 2, -5},
{'l', 4, -5},
{'l', 4, -3},
{'l', 2, -3},
{'m', 3, -3},
{'l', 3, -5},
{'m', 6, -3},
{'l', 6, -5},
{'l', 8, -5},
{'l', 8, -3},
{'l', 6, -3},
{'m', 7, -3},
{'l', 7, -5},
{'m', 10, -3},
{'l', 10, -5},
{'l', 12, -5},
{'l', 12, -3},
{'l', 10, -3},
{'m', 11, -3},
{'l', 11, -5},
{'m', 14, -3},
{'l', 14, -5},
{'l', 16, -5},
{'l', 16, -3},
{'l', 14, -3},
{'m', 15, -3},
{'l', 15, -5},
};
static cdOperation vf_default_char_178[] = {
{'m', 0, 21},
{'l', 2, 21},
{'l', 2, 19},
{'l', 0, 19},
{'l', 0, 21},
{'m', 1, 21},
{'l', 1, 19},
{'m', 2, 21},
{'l', 4, 21},
{'l', 4, 19},
{'l', 2, 19},
{'l', 2, 21},
{'m', 3, 21},
{'l', 3, 19},
{'m', 10, 21},
{'l', 12, 21},
{'l', 12, 19},
{'l', 10, 19},
{'l', 10, 21},
{'m', 11, 21},
{'l', 11, 19},
{'m', 12, 21},
{'l', 14, 21},
{'l', 14, 19},
{'l', 12, 19},
{'l', 12, 21},
{'m', 13, 21},
{'l', 13, 19},
{'m', 20, 21},
{'l', 22, 21},
{'l', 22, 19},
{'l', 20, 19},
{'l', 20, 21},
{'m', 21, 21},
{'l', 21, 19},
{'m', 22, 21},
{'l', 24, 21},
{'l', 24, 19},
{'l', 22, 19},
{'l', 22, 21},
{'m', 23, 21},
{'l', 23, 19},
{'m', 4, 17},
{'l', 6, 17},
{'l', 6, 15},
{'l', 4, 15},
{'l', 4, 17},
{'m', 5, 17},
{'l', 5, 15},
{'m', 6, 17},
{'l', 8, 17},
{'l', 8, 15},
{'l', 6, 15},
{'l', 6, 17},
{'m', 7, 17},
{'l', 7, 15},
{'m', 8, 17},
{'l', 10, 17},
{'l', 10, 15},
{'l', 8, 15},
{'l', 8, 17},
{'m', 9, 17},
{'l', 9, 15},
{'m', 0, 13},
{'l', 2, 13},
{'l', 2, 11},
{'l', 0, 11},
{'l', 0, 13},
{'m', 1, 13},
{'l', 1, 11},
{'m', 2, 13},
{'l', 4, 13},
{'l', 4, 11},
{'l', 2, 11},
{'l', 2, 13},
{'m', 3, 13},
{'l', 3, 11},
{'m', 10, 13},
{'l', 12, 13},
{'l', 12, 11},
{'l', 10, 11},
{'l', 10, 13},
{'m', 11, 13},
{'l', 11, 11},
{'m', 12, 13},
{'l', 14, 13},
{'l', 14, 11},
{'l', 12, 11},
{'l', 12, 13},
{'m', 13, 13},
{'l', 13, 11},
{'m', 20, 13},
{'l', 22, 13},
{'l', 22, 11},
{'l', 20, 11},
{'l', 20, 13},
{'m', 21, 13},
{'l', 21, 11},
{'m', 22, 13},
{'l', 24, 13},
{'l', 24, 11},
{'l', 22, 11},
{'l', 22, 13},
{'m', 23, 13},
{'l', 23, 11},
{'m', 14, 9},
{'l', 16, 9},
{'l', 16, 7},
{'l', 14, 7},
{'l', 14, 9},
{'m', 15, 9},
{'l', 15, 7},
{'m', 16, 9},
{'l', 18, 9},
{'l', 18, 7},
{'l', 16, 7},
{'l', 16, 9},
{'m', 17, 9},
{'l', 17, 7},
{'m', 18, 9},
{'l', 20, 9},
{'l', 20, 7},
{'l', 18, 7},
{'l', 18, 9},
{'m', 19, 9},
{'l', 19, 7},
{'m', 0, 5},
{'l', 2, 5},
{'l', 2, 3},
{'l', 0, 3},
{'l', 0, 5},
{'m', 1, 5},
{'l', 1, 3},
{'m', 2, 5},
{'l', 4, 5},
{'l', 4, 3},
{'l', 2, 3},
{'l', 2, 5},
{'m', 3, 5},
{'l', 3, 3},
{'m', 10, 5},
{'l', 12, 5},
{'l', 12, 3},
{'l', 10, 3},
{'l', 10, 5},
{'m', 11, 5},
{'l', 11, 3},
{'m', 12, 5},
{'l', 14, 5},
{'l', 14, 3},
{'l', 12, 3},
{'l', 12, 5},
{'m', 13, 5},
{'l', 13, 3},
{'m', 20, 5},
{'l', 22, 5},
{'l', 22, 3},
{'l', 20, 3},
{'l', 20, 5},
{'m', 21, 5},
{'l', 21, 3},
{'m', 22, 5},
{'l', 24, 5},
{'l', 24, 3},
{'l', 22, 3},
{'l', 22, 5},
{'m', 23, 5},
{'l', 23, 3},
{'m', 4, 1},
{'l', 10, 1},
{'l', 10, -1},
{'l', 4, -1},
{'l', 4, 1},
{'m', 5, 1},
{'l', 5, -1},
{'m', 7, 1},
{'l', 7, -1},
{'m', 9, 1},
{'l', 9, -1},
{'m', 0, -3},
{'l', 2, -3},
{'l', 2, -5},
{'l', 0, -5},
{'l', 0, -3},
{'m', 1, -3},
{'l', 1, -5},
{'m', 2, -3},
{'l', 4, -3},
{'l', 4, -5},
{'l', 2, -5},
{'l', 2, -3},
{'m', 3, -3},
{'l', 3, -5},
{'m', 10, -3},
{'l', 14, -3},
{'l', 14, -5},
{'l', 10, -5},
{'l', 10, -3},
{'m', 11, -3},
{'l', 11, -5},
{'m', 13, -3},
{'l', 13, -5},
{'m', 20, -3},
{'l', 24, -3},
{'l', 24, -5},
{'l', 20, -5},
{'l', 20, -3},
{'m', 21, -3},
{'l', 21, -5},
{'m', 23, -3},
{'l', 23, -5},
{'m', 8, 1},
{'l', 8, -1},
{'m', 6, 1},
{'l', 6, -1},
{'m', 12, -3},
{'l', 12, -5},
{'m', 22, -3},
{'l', 22, -5},
{'m', 18, 17},
{'l', 20, 17},
{'l', 20, 15},
{'l', 18, 15},
{'l', 18, 17},
{'m', 19, 17},
{'l', 19, 15},
{'m', 20, 17},
{'l', 22, 17},
{'l', 22, 15},
{'l', 20, 15},
{'l', 20, 17},
{'m', 21, 17},
{'l', 21, 15},
{'m', 22, 17},
{'l', 24, 17},
{'l', 24, 15},
{'l', 22, 15},
{'l', 22, 17},
{'m', 23, 17},
{'l', 23, 15},
{'m', 0, 9},
{'l', 2, 9},
{'l', 2, 7},
{'l', 0, 7},
{'l', 0, 9},
{'m', 1, 9},
{'l', 1, 7},
{'m', 2, 9},
{'l', 4, 9},
{'l', 4, 7},
{'l', 2, 7},
{'l', 2, 9},
{'m', 3, 9},
{'l', 3, 7},
{'m', 4, 9},
{'l', 6, 9},
{'l', 6, 7},
{'l', 4, 7},
{'l', 4, 9},
{'m', 5, 9},
{'l', 5, 7},
{'m', 18, 1},
{'l', 24, 1},
{'l', 24, -1},
{'l', 18, -1},
{'l', 18, 1},
{'m', 19, 1},
{'l', 19, -1},
{'m', 21, 1},
{'l', 21, -1},
{'m', 23, 1},
{'l', 23, -1},
{'m', 20, 1},
{'l', 20, -1},
{'m', 22, 1},
{'l', 22, -1},
};
static cdOperation vf_default_char_179[] = {
{'m', 0, 21},
{'l', 0, -7},
};
static cdOperation vf_default_char_180[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 0, 5},
{'l', 8, 5},
};
static cdOperation vf_default_char_181[] = {
{'m', 8, -7},
{'l', 8, 21},
{'m', 0, 9},
{'l', 8, 9},
{'m', 0, 5},
{'l', 8, 5},
};
static cdOperation vf_default_char_182[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 0, 5},
{'l', 8, 5},
{'m', 16, 21},
{'l', 16, -7},
};
static cdOperation vf_default_char_183[] = {
{'m', 0, 5},
{'l', 16, 5},
{'l', 16, -7},
{'m', 8, 5},
{'l', 8, -7},
};
static cdOperation vf_default_char_184[] = {
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, -7},
{'m', 0, 5},
{'l', 8, 5},
};
static cdOperation vf_default_char_185[] = {
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
{'m', 16, 21},
{'l', 16, -7},
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, 21},
{'m', 0, 1},
{'l', 0, 1},
};
static cdOperation vf_default_char_186[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 16, 21},
{'l', 16, -7},
};
static cdOperation vf_default_char_187[] = {
{'m', 0, 9},
{'l', 16, 9},
{'l', 16, -7},
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
};
static cdOperation vf_default_char_188[] = {
{'m', 0, 5},
{'l', 16, 5},
{'l', 16, 21},
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, 21},
};
static cdOperation vf_default_char_189[] = {
{'m', 0, 9},
{'l', 16, 9},
{'l', 16, 21},
{'m', 8, 9},
{'l', 8, 21},
};
static cdOperation vf_default_char_190[] = {
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, 21},
{'m', 0, 9},
{'l', 8, 9},
};
static cdOperation vf_default_char_191[] = {
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
};
static cdOperation vf_default_char_192[] = {
{'m', 16, 0},
{'l', 8, 21},
{'l', 0, 0},
{'m', 3, 7},
{'l', 13, 7},
{'m', 4, 28},
{'l', 9, 23},
};
static cdOperation vf_default_char_193[] = {
{'m', 16, 0},
{'l', 8, 21},
{'l', 0, 0},
{'m', 3, 7},
{'l', 13, 7},
{'m', 10, 28},
{'l', 5, 23},
};
static cdOperation vf_default_char_194[] = {
{'m', 16, 0},
{'l', 8, 21},
{'l', 0, 0},
{'m', 3, 7},
{'l', 13, 7},
{'m', 3, 23},
{'l', 8, 28},
{'l', 13, 23},
};
static cdOperation vf_default_char_195[] = {
{'m', 16, 0},
{'l', 8, 21},
{'l', 0, 0},
{'m', 3, 7},
{'l', 13, 7},
{'m', 2, 24},
{'l', 7, 27},
{'l', 11, 24},
{'l', 15, 26},
};
static cdOperation vf_default_char_196[] = {
{'m', 0, 5},
{'l', 16, 5},
};
static cdOperation vf_default_char_197[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 0, 5},
{'l', 16, 5},
};
static cdOperation vf_default_char_198[] = {
{'m', 0, -7},
{'l', 0, 21},
{'m', 8, 9},
{'l', 0, 9},
{'m', 8, 5},
{'l', 0, 5},
};
static cdOperation vf_default_char_199[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 16, 5},
{'l', 8, 5},
{'m', 0, 21},
{'l', 0, -7},
};
static cdOperation vf_default_char_200[] = {
{'m', 13, 21},
{'l', 0, 21},
{'l', 0, 0},
{'l', 13, 0},
{'m', 0, 11},
{'l', 8, 11},
{'m', 4, 28},
{'l', 9, 23},
};
static cdOperation vf_default_char_201[] = {
{'m', 16, 9},
{'l', 0, 9},
{'l', 0, -7},
{'m', 16, 5},
{'l', 8, 5},
{'l', 8, -7},
};
static cdOperation vf_default_char_202[] = {
{'m', 13, 21},
{'l', 0, 21},
{'l', 0, 0},
{'l', 13, 0},
{'m', 0, 11},
{'l', 8, 11},
{'m', 2, 24},
{'l', 7, 29},
{'l', 12, 24},
{'l', 7, 29},
{'l', 2, 24},
};
static cdOperation vf_default_char_203[] = {
{'m', 13, 21},
{'l', 0, 21},
{'l', 0, 0},
{'l', 13, 0},
{'m', 0, 11},
{'l', 8, 11},
{'m', 4, 26},
{'l', 3, 25},
{'l', 4, 24},
{'l', 5, 25},
{'l', 4, 26},
{'m', 12, 26},
{'l', 11, 25},
{'l', 12, 24},
{'l', 13, 25},
{'l', 12, 26},
};
static cdOperation vf_default_char_204[] = {
{'m', 5, 21},
{'l', 5, 0},
{'m', 0, 28},
{'l', 5, 23},
};
static cdOperation vf_default_char_205[] = {
{'m', 5, 21},
{'l', 5, 0},
{'m', 10, 28},
{'l', 5, 23},
};
static cdOperation vf_default_char_206[] = {
{'m', 6, 21},
{'l', 6, 0},
{'m', 2, 26},
{'l', 7, 31},
{'l', 12, 26},
};
static cdOperation vf_default_char_207[] = {
{'m', 8, 21},
{'l', 8, 0},
{'m', 4, 26},
{'l', 3, 25},
{'l', 4, 24},
{'l', 5, 25},
{'l', 4, 26},
{'m', 12, 26},
{'l', 11, 25},
{'l', 12, 24},
{'l', 13, 25},
{'l', 12, 26},
};
static cdOperation vf_default_char_208[] = {
{'m', 6, 21},
{'l', 6, 0},
{'m', 6, 21},
{'l', 13, 21},
{'l', 16, 20},
{'l', 18, 18},
{'l', 19, 16},
{'l', 20, 13},
{'l', 20, 8},
{'l', 19, 5},
{'l', 18, 3},
{'l', 16, 1},
{'l', 13, 0},
{'l', 6, 0},
{'m', 0, 10},
{'l', 12, 10},
};
static cdOperation vf_default_char_209[] = {
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
{'m', 16, 5},
{'l', 8, 5},
{'m', 0, 9},
{'l', 16, 9},
};
static cdOperation vf_default_char_210[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 4, 28},
{'l', 9, 23},
};
static cdOperation vf_default_char_211[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 10, 28},
{'l', 5, 23},
};
static cdOperation vf_default_char_212[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 3, 23},
{'l', 8, 28},
{'l', 13, 23},
};
static cdOperation vf_default_char_213[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 2, 24},
{'l', 7, 27},
{'l', 11, 24},
{'l', 15, 26},
};
static cdOperation vf_default_char_214[] = {
{'m', 16, 5},
{'l', 0, 5},
{'l', 0, -7},
{'m', 8, 5},
{'l', 8, -7},
};
static cdOperation vf_default_char_215[] = {
{'m', 0, 0},
{'l', 14, 14},
{'m', 0, 13},
{'l', 14, -1},
};
static cdOperation vf_default_char_216[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 1, -3},
{'l', 2, -1},
{'l', 16, 23},
};
static cdOperation vf_default_char_217[] = {
{'m', 0, 21},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 6, 0},
{'l', 8, 0},
{'l', 11, 1},
{'l', 13, 3},
{'l', 14, 6},
{'l', 14, 21},
{'m', 4, 28},
{'l', 9, 23},
};
static cdOperation vf_default_char_218[] = {
{'m', 0, 21},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 6, 0},
{'l', 8, 0},
{'l', 11, 1},
{'l', 13, 3},
{'l', 14, 6},
{'l', 14, 21},
{'m', 10, 28},
{'l', 5, 23},
};
static cdOperation vf_default_char_219[] = {
{'m', 0, 21},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 6, 0},
{'l', 8, 0},
{'l', 11, 1},
{'l', 13, 3},
{'l', 14, 6},
{'l', 14, 21},
{'m', 2, 24},
{'l', 7, 29},
{'l', 12, 24},
{'l', 7, 29},
{'l', 2, 24},
};
static cdOperation vf_default_char_220[] = {
{'m', 16, 0},
{'l', 0, 0},
{'l', 0, 11},
{'l', 16, 11},
{'l', 16, 0},
{'l', 15, 0},
{'l', 15, 11},
{'m', 1, 11},
{'l', 1, 0},
{'m', 2, 11},
{'l', 2, 0},
{'m', 3, 11},
{'l', 3, 0},
{'m', 4, 11},
{'l', 4, 0},
{'m', 5, 11},
{'l', 5, 0},
{'m', 6, 11},
{'l', 6, 0},
{'m', 7, 11},
{'l', 7, 0},
{'m', 8, 11},
{'l', 8, 0},
{'m', 9, 11},
{'l', 9, 0},
{'m', 10, 11},
{'l', 10, 0},
{'m', 11, 11},
{'l', 11, 0},
{'m', 12, 11},
{'l', 12, 0},
{'m', 13, 11},
{'l', 13, 0},
{'m', 14, 11},
{'l', 14, 0},
};
static cdOperation vf_default_char_221[] = {
{'m', 0, 21},
{'l', 8, 11},
{'l', 8, 0},
{'m', 16, 21},
{'l', 8, 11},
{'m', 10, 28},
{'l', 5, 23},
};
static cdOperation vf_default_char_222[] = {
{'m', 9, 0},
{'l', 9, 21},
{'m', 10, 21},
{'l', 10, 0},
{'m', 11, 21},
{'l', 11, 0},
{'m', 12, 21},
{'l', 12, 0},
{'m', 13, 21},
{'l', 13, 0},
{'m', 14, 21},
{'l', 14, 0},
{'m', 15, 21},
{'l', 15, 0},
{'m', 16, 21},
{'l', 16, 0},
{'m', 17, 21},
{'l', 17, 0},
};
static cdOperation vf_default_char_223[] = {
{'m', 0, 1},
{'l', 10, 1},
{'l', 13, 3},
{'l', 13, 7},
{'l', 9, 9},
{'l', 13, 11},
{'l', 13, 14},
{'l', 10, 16},
{'l', 3, 16},
{'l', 0, 14},
{'l', 0, -3},
{'m', 9, 9},
{'l', 0, 9},
};
static cdOperation vf_default_char_224[] = {
{'m', 18, 0},
{'l', 12, 9},
{'l', 10, 11},
{'l', 8, 12},
{'l', 5, 12},
{'l', 3, 11},
{'l', 1, 9},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 18, 12},
};
static cdOperation vf_default_char_225[] = {
{'m', 0, 1},
{'l', 10, 1},
{'l', 13, 3},
{'l', 13, 7},
{'l', 9, 9},
{'l', 13, 11},
{'l', 13, 14},
{'l', 10, 16},
{'l', 3, 16},
{'l', 0, 14},
{'l', 0, -3},
{'m', 9, 9},
{'l', 0, 9},
};
static cdOperation vf_default_char_226[] = {
{'m', 0, 0},
{'l', 0, 14},
{'l', 9, 14},
{'l', 9, 11},
};
static cdOperation vf_default_char_227[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 0, 17},
{'l', 5, 20},
{'l', 9, 17},
{'l', 13, 19},
};
static cdOperation vf_default_char_228[] = {
{'m', 13, 2},
{'l', 13, 0},
{'l', 0, 0},
{'l', 8, 11},
{'l', 0, 21},
{'l', 13, 21},
{'l', 13, 19},
};
static cdOperation vf_default_char_229[] = {
{'m', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 12, 9},
{'l', 10, 11},
{'l', 8, 12},
{'l', 5, 12},
{'l', 3, 11},
{'l', 1, 9},
{'l', 0, 6},
{'m', 5, 12},
{'l', 9, 14},
{'l', 20, 14},
};
static cdOperation vf_default_char_230[] = {
{'m', 2, 14},
{'l', 2, 4},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 13, 4},
{'m', 13, 14},
{'l', 13, 0},
{'m', 3, 1},
{'l', 3, -3},
{'l', 0, -6},
};
static cdOperation vf_default_char_231[] = {
{'m', 0, 9},
{'l', 0, 11},
{'l', 1, 13},
{'l', 3, 14},
{'l', 6, 14},
{'l', 8, 12},
{'l', 8, -2},
{'m', 8, 9},
{'l', 11, 11},
{'l', 14, 14},
};
static cdOperation vf_default_char_232[] = {
{'m', 0, 9},
{'l', 1, 6},
{'l', 3, 4},
{'l', 5, 3},
{'l', 8, 3},
{'l', 10, 4},
{'l', 12, 6},
{'l', 13, 9},
{'l', 12, 12},
{'l', 10, 14},
{'l', 8, 15},
{'l', 5, 15},
{'l', 3, 14},
{'l', 1, 12},
{'l', 0, 9},
{'m', 6, 21},
{'l', 6, 15},
{'m', 7, 21},
{'l', 7, 15},
{'m', 0, 21},
{'l', 13, 21},
{'m', 6, -3},
{'l', 6, 3},
{'m', 7, -3},
{'l', 7, 3},
{'m', 0, -3},
{'l', 13, -3},
};
static cdOperation vf_default_char_233[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 0, 10},
{'l', 16, 10},
};
static cdOperation vf_default_char_234[] = {
{'m', 16, 0},
{'l', 11, 0},
{'l', 11, 6},
{'l', 14, 7},
{'l', 16, 9},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 9},
{'l', 2, 7},
{'l', 5, 6},
{'l', 5, 0},
{'l', 0, 0},
};
static cdOperation vf_default_char_235[] = {
{'m', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 12, 9},
{'l', 10, 11},
{'l', 8, 12},
{'l', 5, 12},
{'l', 3, 11},
{'l', 1, 9},
{'l', 0, 6},
{'m', 10, 11},
{'l', 0, 21},
{'l', 13, 21},
{'l', 13, 18},
};
static cdOperation vf_default_char_236[] = {
{'m', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 12, 9},
{'l', 10, 11},
{'l', 8, 12},
{'l', 5, 12},
{'l', 3, 11},
{'l', 1, 9},
{'l', 0, 6},
{'m', 12, 6},
{'l', 13, 3},
{'l', 15, 1},
{'l', 17, 0},
{'l', 20, 0},
{'l', 22, 1},
{'l', 24, 3},
{'l', 25, 6},
{'l', 24, 9},
{'l', 22, 11},
{'l', 20, 12},
{'l', 17, 12},
{'l', 15, 11},
{'l', 13, 9},
{'l', 12, 6},
};
static cdOperation vf_default_char_237[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 0, -3},
{'l', 13, 17},
};
static cdOperation vf_default_char_238[] = {
{'m', 13, 21},
{'l', 3, 21},
{'l', 0, 19},
{'l', 0, 11},
{'l', 8, 11},
{'m', 0, 11},
{'l', 0, 2},
{'l', 3, 0},
{'l', 13, 0},
};
static cdOperation vf_default_char_239[] = {
{'m', 0, 0},
{'l', 0, 15},
{'l', 1, 18},
{'l', 3, 20},
{'l', 6, 21},
{'l', 8, 21},
{'l', 11, 20},
{'l', 13, 18},
{'l', 14, 15},
{'l', 14, 0},
};
static cdOperation vf_default_char_240[] = {
{'m', 0, 9},
{'l', 18, 9},
{'m', 0, 5},
{'l', 18, 5},
{'m', 0, 13},
{'l', 18, 13},
};
static cdOperation vf_default_char_241[] = {
{'m', 0, 0},
{'l', 18, 0},
{'m', 9, 21},
{'l', 9, 3},
{'m', 0, 12},
{'l', 18, 12},
};
static cdOperation vf_default_char_242[] = {
{'m', 0, 0},
{'l', 18, 0},
{'m', 0, 21},
{'l', 18, 12},
{'l', 0, 3},
};
static cdOperation vf_default_char_243[] = {
{'m', 18, 0},
{'l', 0, 0},
{'m', 18, 21},
{'l', 0, 12},
{'l', 18, 3},
};
static cdOperation vf_default_char_244[] = {
{'m', 10, 20},
{'l', 7, 21},
{'l', 5, 21},
{'l', 2, 20},
{'l', 1, 19},
{'l', 0, 16},
{'l', 0, -7},
};
static cdOperation vf_default_char_245[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 0, 17},
{'l', 5, 20},
{'l', 9, 17},
{'l', 13, 19},
};
static cdOperation vf_default_char_246[] = {
{'m', 9, 20},
{'l', 8, 19},
{'l', 9, 18},
{'l', 10, 19},
{'l', 9, 20},
{'m', 9, 3},
{'l', 8, 2},
{'l', 9, 1},
{'l', 10, 2},
{'l', 9, 3},
{'m', 0, 10},
{'l', 18, 10},
};
static cdOperation vf_default_char_247[] = {
{'m', 9, 20},
{'l', 8, 19},
{'l', 9, 18},
{'l', 10, 19},
{'l', 9, 20},
{'m', 9, 3},
{'l', 8, 2},
{'l', 9, 1},
{'l', 10, 2},
{'l', 9, 3},
{'m', 0, 10},
{'l', 18, 10},
};
static cdOperation vf_default_char_248[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 0, -3},
{'l', 13, 17},
};
static cdOperation vf_default_char_249[] = {
{'m', 0, 4},
{'l', 3, 4},
{'l', 3, 0},
{'l', 0, 0},
{'l', 0, 4},
{'m', 1, 4},
{'l', 1, 0},
{'m', 2, 4},
{'l', 2, 0},
};
static cdOperation vf_default_char_250[] = {
{'m', 0, 2},
{'l', 3, 2},
{'l', 3, 0},
{'l', 0, 0},
{'l', 0, 2},
{'l', 3, 1},
{'m', 1, 2},
{'l', 1, 0},
{'m', 2, 2},
{'l', 2, 0},
};
static cdOperation vf_default_char_251[] = {
{'m', 16, 18},
{'l', 16, 21},
{'l', 8, 21},
{'l', 8, 0},
{'l', 0, 10},
};
static cdOperation vf_default_char_252[] = {
{'m', 0, 21},
{'l', 0, 10},
{'m', 0, 17},
{'l', 3, 20},
{'l', 5, 21},
{'l', 8, 21},
{'l', 10, 20},
{'l', 11, 17},
{'l', 11, 10},
};
static cdOperation vf_default_char_253[] = {
{'m', 1, 14},
{'l', 7, 0},
{'m', 13, 14},
{'l', 7, 0},
{'l', 5, -4},
{'l', 3, -6},
{'l', 1, -7},
{'l', 0, -7},
{'m', 10, 22},
{'l', 5, 17},
};
static cdOperation vf_default_char_254[] = {
{'m', 0, 0},
{'l', 0, 11},
{'l', 8, 11},
{'l', 8, 0},
{'l', 0, 0},
{'m', 1, 11},
{'l', 1, 0},
{'m', 2, 11},
{'l', 2, 0},
{'m', 3, 11},
{'l', 3, 0},
{'m', 4, 11},
{'l', 4, 0},
{'m', 5, 11},
{'l', 5, 0},
{'m', 6, 11},
{'l', 6, 0},
{'m', 7, 11},
{'l', 7, 0},
};
static cdCaracter vf_default_chars[256] = {
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{12, 6, 0, 0},
{6, 3, 7, vf_default_char_33},
{14, 7, 16, vf_default_char_34},
{18, 9, 8, vf_default_char_35},
{17, 8, 38, vf_default_char_36},
{21, 10, 29, vf_default_char_37},
{22, 11, 46, vf_default_char_38},
{6, 3, 7, vf_default_char_39},
{10, 5, 18, vf_default_char_40},
{11, 5, 18, vf_default_char_41},
{13, 6, 6, vf_default_char_42},
{22, 11, 4, vf_default_char_43},
{6, 3, 8, vf_default_char_44},
{22, 11, 2, vf_default_char_45},
{6, 3, 5, vf_default_char_46},
{14, 7, 2, vf_default_char_47},
{17, 8, 17, vf_default_char_48},
{14, 7, 4, vf_default_char_49},
{17, 8, 14, vf_default_char_50},
{17, 8, 15, vf_default_char_51},
{17, 8, 5, vf_default_char_52},
{17, 8, 17, vf_default_char_53},
{16, 8, 23, vf_default_char_54},
{17, 8, 4, vf_default_char_55},
{17, 8, 29, vf_default_char_56},
{17, 8, 23, vf_default_char_57},
{6, 3, 10, vf_default_char_58},
{6, 3, 13, vf_default_char_59},
{20, 10, 3, vf_default_char_60},
{22, 11, 4, vf_default_char_61},
{20, 10, 3, vf_default_char_62},
{15, 7, 19, vf_default_char_63},
{24, 12, 52, vf_default_char_64},
{19, 9, 5, vf_default_char_65},
{17, 8, 21, vf_default_char_66},
{19, 9, 18, vf_default_char_67},
{17, 8, 14, vf_default_char_68},
{15, 7, 6, vf_default_char_69},
{14, 7, 6, vf_default_char_70},
{18, 9, 21, vf_default_char_71},
{18, 9, 6, vf_default_char_72},
{4, 2, 2, vf_default_char_73},
{14, 7, 10, vf_default_char_74},
{17, 8, 6, vf_default_char_75},
{13, 6, 4, vf_default_char_76},
{20, 10, 8, vf_default_char_77},
{18, 9, 6, vf_default_char_78},
{19, 9, 21, vf_default_char_79},
{17, 8, 11, vf_default_char_80},
{19, 9, 23, vf_default_char_81},
{17, 8, 14, vf_default_char_82},
{17, 8, 20, vf_default_char_83},
{15, 7, 4, vf_default_char_84},
{18, 9, 10, vf_default_char_85},
{17, 8, 4, vf_default_char_86},
{22, 11, 8, vf_default_char_87},
{17, 8, 4, vf_default_char_88},
{17, 8, 5, vf_default_char_89},
{17, 8, 6, vf_default_char_90},
{7, 3, 8, vf_default_char_91},
{14, 7, 2, vf_default_char_92},
{8, 4, 8, vf_default_char_93},
{19, 9, 6, vf_default_char_94},
{17, 8, 2, vf_default_char_95},
{6, 3, 7, vf_default_char_96},
{16, 8, 16, vf_default_char_97},
{15, 7, 16, vf_default_char_98},
{15, 7, 14, vf_default_char_99},
{16, 8, 16, vf_default_char_100},
{15, 7, 17, vf_default_char_101},
{10, 5, 7, vf_default_char_102},
{16, 8, 21, vf_default_char_103},
{15, 7, 9, vf_default_char_104},
{7, 3, 7, vf_default_char_105},
{9, 4, 10, vf_default_char_106},
{13, 6, 6, vf_default_char_107},
{4, 2, 2, vf_default_char_108},
{26, 13, 16, vf_default_char_109},
{15, 7, 9, vf_default_char_110},
{16, 8, 17, vf_default_char_111},
{15, 7, 16, vf_default_char_112},
{16, 8, 16, vf_default_char_113},
{9, 4, 7, vf_default_char_114},
{14, 7, 17, vf_default_char_115},
{10, 5, 7, vf_default_char_116},
{15, 7, 9, vf_default_char_117},
{14, 7, 4, vf_default_char_118},
{19, 9, 8, vf_default_char_119},
{14, 7, 4, vf_default_char_120},
{15, 7, 8, vf_default_char_121},
{14, 7, 6, vf_default_char_122},
{10, 5, 37, vf_default_char_123},
{4, 2, 2, vf_default_char_124},
{9, 4, 37, vf_default_char_125},
{14, 7, 4, vf_default_char_126},
{16, 8, 8, vf_default_char_127},
{18, 9, 30, vf_default_char_128},
{15, 7, 19, vf_default_char_129},
{15, 7, 19, vf_default_char_130},
{18, 9, 19, vf_default_char_131},
{16, 8, 26, vf_default_char_132},
{16, 8, 18, vf_default_char_133},
{16, 8, 23, vf_default_char_134},
{15, 7, 21, vf_default_char_135},
{18, 9, 20, vf_default_char_136},
{15, 7, 27, vf_default_char_137},
{15, 7, 19, vf_default_char_138},
{12, 6, 12, vf_default_char_139},
{16, 8, 5, vf_default_char_140},
{7, 3, 4, vf_default_char_141},
{17, 8, 15, vf_default_char_142},
{17, 8, 12, vf_default_char_143},
{15, 7, 8, vf_default_char_144},
{28, 14, 33, vf_default_char_145},
{26, 13, 10, vf_default_char_146},
{16, 8, 20, vf_default_char_147},
{16, 8, 27, vf_default_char_148},
{16, 8, 19, vf_default_char_149},
{17, 8, 12, vf_default_char_150},
{15, 7, 11, vf_default_char_151},
{15, 7, 18, vf_default_char_152},
{19, 9, 31, vf_default_char_153},
{18, 9, 20, vf_default_char_154},
{15, 7, 16, vf_default_char_155},
{21, 10, 12, vf_default_char_156},
{17, 8, 9, vf_default_char_157},
{21, 10, 18, vf_default_char_158},
{17, 8, 15, vf_default_char_159},
{16, 8, 18, vf_default_char_160},
{7, 3, 4, vf_default_char_161},
{16, 8, 19, vf_default_char_162},
{15, 7, 11, vf_default_char_163},
{17, 8, 13, vf_default_char_164},
{18, 9, 8, vf_default_char_165},
{16, 8, 18, vf_default_char_166},
{16, 8, 17, vf_default_char_167},
{15, 7, 19, vf_default_char_168},
{16, 8, 7, vf_default_char_169},
{16, 8, 7, vf_default_char_170},
{19, 9, 15, vf_default_char_171},
{19, 9, 10, vf_default_char_172},
{6, 3, 7, vf_default_char_173},
{19, 9, 6, vf_default_char_174},
{19, 9, 6, vf_default_char_175},
{14, 7, 126, vf_default_char_176},
{16, 8, 252, vf_default_char_177},
{24, 12, 276, vf_default_char_178},
{5, 2, 2, vf_default_char_179},
{13, 6, 4, vf_default_char_180},
{13, 6, 6, vf_default_char_181},
{21, 10, 6, vf_default_char_182},
{21, 10, 5, vf_default_char_183},
{13, 6, 5, vf_default_char_184},
{21, 10, 10, vf_default_char_185},
{20, 10, 4, vf_default_char_186},
{21, 10, 6, vf_default_char_187},
{21, 10, 6, vf_default_char_188},
{21, 10, 5, vf_default_char_189},
{13, 6, 5, vf_default_char_190},
{0, 0, 3, vf_default_char_191},
{19, 9, 7, vf_default_char_192},
{19, 9, 7, vf_default_char_193},
{19, 9, 8, vf_default_char_194},
{19, 9, 9, vf_default_char_195},
{16, 8, 2, vf_default_char_196},
{16, 8, 4, vf_default_char_197},
{8, 4, 6, vf_default_char_198},
{16, 8, 6, vf_default_char_199},
{15, 7, 8, vf_default_char_200},
{16, 8, 6, vf_default_char_201},
{15, 7, 11, vf_default_char_202},
{15, 7, 16, vf_default_char_203},
{9, 2, 4, vf_default_char_204},
{9, 2, 4, vf_default_char_205},
{12, 2, 5, vf_default_char_206},
{12, 2, 12, vf_default_char_207},
{23, 8, 16, vf_default_char_208},
{16, 8, 7, vf_default_char_209},
{19, 9, 23, vf_default_char_210},
{19, 9, 23, vf_default_char_211},
{19, 9, 24, vf_default_char_212},
{19, 9, 25, vf_default_char_213},
{16, 8, 5, vf_default_char_214},
{18, 11, 4, vf_default_char_215},
{19, 9, 24, vf_default_char_216},
{18, 9, 12, vf_default_char_217},
{18, 9, 12, vf_default_char_218},
{18, 9, 15, vf_default_char_219},
{16, 8, 35, vf_default_char_220},
{17, 8, 7, vf_default_char_221},
{17, 8, 18, vf_default_char_222},
{18, 9, 13, vf_default_char_223},
{22, 11, 15, vf_default_char_224},
{18, 9, 13, vf_default_char_225},
{14, 7, 4, vf_default_char_226},
{16, 8, 20, vf_default_char_227},
{18, 9, 7, vf_default_char_228},
{24, 12, 18, vf_default_char_229},
{18, 9, 12, vf_default_char_230},
{18, 9, 10, vf_default_char_231},
{18, 9, 27, vf_default_char_232},
{21, 10, 23, vf_default_char_233},
{21, 10, 20, vf_default_char_234},
{18, 9, 19, vf_default_char_235},
{29, 14, 30, vf_default_char_236},
{16, 8, 19, vf_default_char_237},
{17, 8, 9, vf_default_char_238},
{19, 9, 10, vf_default_char_239},
{23, 11, 6, vf_default_char_240},
{23, 11, 6, vf_default_char_241},
{23, 11, 5, vf_default_char_242},
{24, 12, 5, vf_default_char_243},
{13, 6, 7, vf_default_char_244},
{16, 8, 21, vf_default_char_245},
{23, 11, 12, vf_default_char_246},
{23, 11, 12, vf_default_char_247},
{16, 8, 19, vf_default_char_248},
{7, 3, 9, vf_default_char_249},
{7, 3, 10, vf_default_char_250},
{18, 9, 5, vf_default_char_251},
{15, 7, 9, vf_default_char_252},
{15, 7, 10, vf_default_char_253},
{13, 6, 19, vf_default_char_254},
{ 0, 0, 0, 0}
};

/******************************************************/
/* inicializacao & controle                           */
/******************************************************/

static void vf_releasefontchars(cdVectorFont *vector_font)
{
  int c;

  for (c=0; c<256; c++)
  {
    if (vector_font->chars[c].op)
      free(vector_font->chars[c].op);
  }

  free(vector_font->chars);
}

static void vf_setdefaultfont(cdVectorFont *vector_font)
{
  if (vector_font->chars && vector_font->chars != vf_default_chars) 
    vf_releasefontchars(vector_font);

  strcpy(vector_font->name, "Simplex II");
  vector_font->file_name[0] = 0;
  vector_font->chars        = vf_default_chars;
  vector_font->top          = vf_default_top;
  vector_font->cap          = vf_default_cap;
  vector_font->half         = vf_default_half;
  vector_font->bottom       = vf_default_bottom;
}

static int vf_readfontfile(FILE *file, cdVectorFont *vector_font)
{
  int c, right, center, operations;

  if (vector_font->chars && vector_font->chars != vf_default_chars) 
    vf_releasefontchars(vector_font);

  vector_font->chars = (cdCaracter *)calloc(256, sizeof(cdCaracter));
  if (!vector_font->chars) 
    return 0;

  if (fscanf(file,"%d%d%d%d",&vector_font->top,&vector_font->cap,&vector_font->half,&vector_font->bottom) != 4)
  {
    if (fscanf(file, "%[^\n]", vector_font->name) != 1)
      return 0;
    if (fscanf(file,"%d%d%d%d",&vector_font->top,&vector_font->cap,&vector_font->half,&vector_font->bottom)!=4)
      return 0;
  }
  else 
    sprintf(vector_font->name, "Unknown");

  while (fscanf(file, "%d%d%d%d", &c, &right, &center, &operations) == 4)
  {
    vector_font->chars[c].right = right;
    vector_font->chars[c].center = center;
    vector_font->chars[c].operations = operations;
    if (operations)
    {
      int i;
      vector_font->chars[c].op = (cdOperation *)calloc(operations, sizeof(cdOperation));
      if (!vector_font->chars[c].op) return 0;
      for (i=0; i<operations; i++)
      {
        char operation;
        int x, y;

        if (fscanf(file, "\n%c%d%d", &operation, &x, &y) != 3)
          return 0;

        vector_font->chars[c].op[i].operation = operation;
        vector_font->chars[c].op[i].x = (signed char)x;
        vector_font->chars[c].op[i].y = (signed char)y;
      }
    }
  }

  return 1;
}

static int vf_readfontstring(const char* strdata, cdVectorFont *vector_font)
{
  int c, right, center, operations;

  if (vector_font->chars && vector_font->chars != vf_default_chars) 
    vf_releasefontchars(vector_font);

  vector_font->chars = (cdCaracter *)calloc(256, sizeof(cdCaracter));
  if (!vector_font->chars) 
    return 0;

  /* try to read without a name */
  if (sscanf(strdata,"%d%d%d%d",&vector_font->top,&vector_font->cap,&vector_font->half,&vector_font->bottom) != 4)
  {
    if (sscanf(strdata, "%[^\n]", vector_font->name) != 1)
      return 0;
    strdata = strstr(strdata, "\n")+1; /* goto next line */
    if (strdata == (void*)1) return 0;

    if (sscanf(strdata,"%d%d%d%d",&vector_font->top,&vector_font->cap,&vector_font->half,&vector_font->bottom)!=4)
      return 0;
    strdata = strstr(strdata, "\n");   /* goto next line */
    if (strdata == (void*)1) return 0;
  }
  else 
  {
    strdata = strstr(strdata, "\n")+1; /* goto next line */
    sprintf(vector_font->name, "Unknown");
  }

  /* skip 2 blank lines */
  strdata = strstr(strdata, "\n")+1; /* goto next line */
  strdata = strstr(strdata, "\n")+1; /* goto next line */

  /* for each font character */
  while (sscanf(strdata, "%d%d%d%d", &c, &right, &center, &operations) == 4)
  {
    strdata = strstr(strdata, "\n")+1; /* goto next line */
    if (strdata == (void*)1) return 0;

    vector_font->chars[c].right = right;
    vector_font->chars[c].center = center;
    vector_font->chars[c].operations = operations;
    if (operations)
    {
      int i;
      vector_font->chars[c].op = (cdOperation *)calloc(operations, sizeof(cdOperation));
      if (!vector_font->chars[c].op) return 0;
      for (i=0; i<operations; i++)
      {
        char operation;
        int x, y;

        if (sscanf(strdata, "%c%d%d", &operation, &x, &y) != 3)
          return 0;
        strdata = strstr(strdata, "\n")+1; /* goto next line */
        if (strdata == (void*)1) return 0;

        vector_font->chars[c].op[i].operation = operation;
        vector_font->chars[c].op[i].x = (signed char)x;
        vector_font->chars[c].op[i].y = (signed char)y;
      }
    }

    /* skip 1 blank line */
    strdata = strstr(strdata, "\n")+1; /* goto next line */
    if (strdata == (void*)1) return 1;
  }

  return 1;
}

static int vf_textwidth(cdVectorFont *vector_font, const char* str)
{
  int width = 0;
  while (*str && *str!='\n')
    width += vector_font->chars[(unsigned char)(*(str++))].right;
  if (width==0) width = 1;
  return width;
}

static void vf_move_dir(cdVectorFont *vector_font, int *x, int *y, double dx, double dy)
{
  *x += cdRound(vector_font->current_cos*dx - vector_font->current_sin*dy);
  *y += cdRound(vector_font->current_sin*dx + vector_font->current_cos*dy);
}

static void vf_wmove_dir(cdVectorFont *vector_font, double *x, double *y, double dx, double dy)
{
  *x += vector_font->current_cos*dx - vector_font->current_sin*dy;
  *y += vector_font->current_sin*dx + vector_font->current_cos*dy;
}

static void vf_draw_char(cdVectorFont *vector_font, char c, int *x, int *y)
{
  unsigned char ac = vf_ansi2ascii[(unsigned char)c];
  cdOperation *current = vector_font->chars[ac].op;
  int m, op = vector_font->chars[ac].operations;

  for(m = 0; m < op; m++)
  {
    int px = *x;
    int py = *y;

    if (current->operation == 'm')
    {
      if (m) cdCanvasEnd(vector_font->canvas);
      cdCanvasBegin(vector_font->canvas, CD_OPEN_LINES);
    }

    vf_move_dir(vector_font, &px, &py, current->x*vector_font->size_x, current->y*vector_font->size_y);

    if (vector_font->text_transf)
    {
      double aux = px*vector_font->text_matrix[3] + py*vector_font->text_matrix[4] + vector_font->text_matrix[5];
      py = cdRound(px*vector_font->text_matrix[0] + py*vector_font->text_matrix[1] + vector_font->text_matrix[2]);
      px = _cdRound(aux);
    }

    cdCanvasVertex(vector_font->canvas, px, py);
    current++; 
  }

  if (m) cdCanvasEnd(vector_font->canvas);
}

static void vf_wdraw_char(cdVectorFont *vector_font, char c, double *x, double *y)
{
  unsigned char ac = vf_ansi2ascii[(unsigned char)c];
  cdOperation *current = vector_font->chars[ac].op;
  int m, op = vector_font->chars[ac].operations;

  for(m = 0; m < op; m++)
  {
    double px = *x;
    double py = *y;

    if (current->operation == 'm')
    {
      if (m) cdCanvasEnd(vector_font->canvas);
      cdCanvasBegin(vector_font->canvas, CD_OPEN_LINES);
    }

    vf_wmove_dir(vector_font, &px, &py, current->x*vector_font->size_x, current->y*vector_font->size_y);

    if (vector_font->text_transf)
    {
      double aux = px*vector_font->text_matrix[3] + py*vector_font->text_matrix[4] + vector_font->text_matrix[5];
      py = px*vector_font->text_matrix[0] + py*vector_font->text_matrix[1] + vector_font->text_matrix[2];
      px = aux;
    }

    wdCanvasVertex(vector_font->canvas, px, py);
    current++;
  }

  if (m) cdCanvasEnd(vector_font->canvas);
}

static void vf_move_to_base(cdVectorFont *vector_font, int *x, int *y, const  char* str, int width)
{
  /* move point to baseline/left according to alignment */
  int align = vector_font->canvas->text_alignment;

  if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST)
  {
    vf_move_dir(vector_font, x, y, 0, -vector_font->top*vector_font->size_y);
  }
  else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST)
  {
    vf_move_dir(vector_font, x, y, 0, -vector_font->bottom*vector_font->size_y);  /* bottom is < 0 */
  }
  else if (align == CD_BASE_CENTER || align == CD_BASE_LEFT || align == CD_BASE_RIGHT)
  {
    /* y = y; */
  }
  else /* CD_CENTER || CD_EAST || CD_WEST */
    vf_move_dir(vector_font, x, y, 0, -((double)(vector_font->top+vector_font->bottom)/2.0)*vector_font->size_y);

  if (align == CD_EAST || align == CD_NORTH_EAST || align == CD_SOUTH_EAST || align == CD_BASE_RIGHT)
  {
    if (str) width = vf_textwidth(vector_font, str);
    vf_move_dir(vector_font, x, y, -width*vector_font->size_x, 0);
  }
  else if (align == CD_WEST || align == CD_NORTH_WEST || align == CD_SOUTH_WEST || align == CD_BASE_LEFT)
  {
    /* x = x; */
  }
  else /* CD_CENTER || CD_NORTH || CD_SOUTH */
  {
    if (str) width = vf_textwidth(vector_font, str);
    vf_move_dir(vector_font, x, y, -(width*vector_font->size_x)/2.0, 0);
  }
}

static void vf_wmove_to_base(cdVectorFont *vector_font, double *x, double *y, const  char* str, int width)
{
  /* move point to baseline/left according to alignment */
  int align = vector_font->canvas->text_alignment;

  if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST)
  {
    vf_wmove_dir(vector_font, x, y, 0, -vector_font->top*vector_font->size_y);
  }
  else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST)
  {
    vf_wmove_dir(vector_font, x, y, 0, -vector_font->bottom*vector_font->size_y);  /* bottom is < 0 */
  }
  else if (align == CD_BASE_CENTER || align == CD_BASE_LEFT || align == CD_BASE_RIGHT)
  {
    /* y = y; */
  }
  else /* CD_CENTER || CD_EAST || CD_WEST */
    vf_wmove_dir(vector_font, x, y, 0, -((double)(vector_font->top+vector_font->bottom)/2.0)*vector_font->size_y);

  if (align == CD_EAST || align == CD_NORTH_EAST || align == CD_SOUTH_EAST || align == CD_BASE_RIGHT)
  {
    if (str) width = vf_textwidth(vector_font, str);
    vf_wmove_dir(vector_font, x, y, -width*vector_font->size_x, 0);
  }
  else if (align == CD_WEST || align == CD_NORTH_WEST || align == CD_SOUTH_WEST || align == CD_BASE_LEFT)
  {
    /* x = x; */
  }
  else /* CD_CENTER || CD_NORTH || CD_SOUTH */
  {
    if (str) width = vf_textwidth(vector_font, str);
    vf_wmove_dir(vector_font, x, y, -(width*vector_font->size_x)/2.0, 0);
  }
}

static void vf_draw_text(cdVectorFont* vector_font, int x, int y, const char* str)
{
  vf_move_to_base(vector_font, &x, &y, str, 0);

  while (*str && *str!='\n')
  {
    vf_draw_char(vector_font, *str, &x, &y);
    vf_move_dir(vector_font, &x, &y, (vector_font->chars[(unsigned char)*str].right)*vector_font->size_x, 0);
    str++;
  }
}

static void vf_wdraw_text(cdVectorFont* vector_font, double x, double y, const char* str)
{
  vf_wmove_to_base(vector_font, &x, &y, str, 0);

  while (*str && *str!='\n')
  {
    vf_wdraw_char(vector_font, *str, &x, &y);
    vf_wmove_dir(vector_font, &x, &y, (vector_font->chars[(unsigned char)*str].right)*vector_font->size_x, 0);
    str++;
  }
}

static void vf_calc_point(cdVectorFont *vector_font, int start_x, int start_y, int *x, int *y, int dx, int dy)
{
  *x = start_x;
  *y = start_y;

  vf_move_dir(vector_font, x, y, dx, dy);

  if (vector_font->text_transf)
  {
    double aux = *x * vector_font->text_matrix[3] + *y * vector_font->text_matrix[4] + vector_font->text_matrix[5];
    *y = cdRound(*x * vector_font->text_matrix[0] + *y * vector_font->text_matrix[1] + vector_font->text_matrix[2]);
    *x = _cdRound(aux);
  }
}

static void vf_wcalc_point(cdVectorFont *vector_font, double start_x, double start_y, double *x, double *y, double dx, double dy)
{
  *x = start_x;
  *y = start_y;

  vf_wmove_dir(vector_font, x, y, dx, dy);

  if (vector_font->text_transf)
  {
    double aux = *x * vector_font->text_matrix[3] + *y * vector_font->text_matrix[4] + vector_font->text_matrix[5];
    *y = *x * vector_font->text_matrix[0] + *y * vector_font->text_matrix[1] + vector_font->text_matrix[2];
    *x = aux;
  }
}

static int vf_gettextmaxwidth(cdVectorFont* vector_font, const char* str, int num_lin)
{
  int i, max_w = 0, w;
  const char *p_str, *q;

  p_str = str;

  for(i = 0; i < num_lin; i++)
  {
    /* Calculate line width */
    w = vf_textwidth(vector_font, p_str);
    if (w > max_w) max_w = w;

    /* Advance the string */
    q = strchr(p_str, '\n');
    if (q) p_str = q + 1;  /* skip line break */
  }

  return max_w;
}

static void vf_gettextsize(cdVectorFont* vector_font, const char* str, int *width, int *height)
{
  int num_lin = cdStrLineCount(str);
  if (num_lin == 1)
  {
    *width = vf_textwidth(vector_font, str);
    *height = vector_font->top - vector_font->bottom;
  }
  else
  {
    *width = vf_gettextmaxwidth(vector_font, str, num_lin);
    *height = num_lin*(vector_font->top - vector_font->bottom);
  }
}

static void vf_move_to_first(cdVectorFont* vector_font, int align, int *x, int *y, int num_lin, double line_height)
{
  /* position vertically at the first line */
  if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST ||     /* it is relative to the full text */
      align == CD_BASE_LEFT || align == CD_BASE_CENTER || align == CD_BASE_RIGHT)  /* it is relative to the first line already */
  {
    /* Already at position */
  }
  else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST)  /* it is relative to the full text */
  {
    vf_move_dir(vector_font, x, y, 0, (num_lin-1)*line_height);
  }
  else  /* CD_CENTER || CD_EAST || CD_WEST */                                      /* it is relative to the full text */
    vf_move_dir(vector_font, x, y, 0, (num_lin-1)*line_height/2.0);
}

static void vf_wmove_to_first(cdVectorFont* vector_font, int align, double *x, double *y, int num_lin, double line_height)
{
  /* position vertically at the first line */
  if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST ||     /* it is relative to the full text */
      align == CD_BASE_LEFT || align == CD_BASE_CENTER || align == CD_BASE_RIGHT)  /* it is relative to the first line already */
  {
    /* Already at position */
  }
  else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST)  /* it is relative to the full text */
  {
    vf_wmove_dir(vector_font, x, y, 0, (num_lin-1)*line_height);
  }
  else  /* CD_CENTER || CD_EAST || CD_WEST */                                      /* it is relative to the full text */
    vf_wmove_dir(vector_font, x, y, 0, (num_lin-1)*line_height/2.0);
}

/******************************************************/
/* vector text                                        */
/******************************************************/

cdVectorFont* cdCreateVectorFont(cdCanvas* canvas)
{
  cdVectorFont* vector_font;

  assert(canvas);
  if (!_cdCheckCanvas(canvas)) return NULL;

  vector_font = calloc(1, sizeof(cdVectorFont));

  vector_font->canvas = canvas;

  vf_setdefaultfont(vector_font);

  vector_font->size_x = 1.0;
  vector_font->size_y = 1.0;

  vector_font->current_cos  = 1.0;
  vector_font->current_sin  = 0.0;

  vector_font->text_transf  = 0;

  return vector_font;
}

void cdKillVectorFont(cdVectorFont* vector_font)
{
  assert(vector_font);
  if (!vector_font) return;

  if (vector_font->chars && vector_font->chars != vf_default_chars) 
    vf_releasefontchars(vector_font);     /* not the default font */

  free(vector_font);
}

char *cdCanvasVectorFont(cdCanvas* canvas, const char *file)
{
  cdVectorFont* vector_font;

  assert(canvas);
  assert(file);
  if (!_cdCheckCanvas(canvas)) return NULL;

  if (file[0] == 0)
    return NULL;

  vector_font = canvas->vector_font;
  if (!file) 
  {
    vf_setdefaultfont(vector_font);
    vector_font->file_name[0] = 0;
  }
  else
  {
    FILE *font = NULL;
    int read_ok;
    char *env;

    /* se arquivo foi o mesmo que o arq. corrente, entao retorna */
    if (strcmp (file, vector_font->file_name) == 0)
        return vector_font->name;

    /* abre arq. no dir. corrente */
    font = fopen(file, "r");

    /* se nao conseguiu, abre arq. no dir. do cd, */
    env = getenv("CDDIR");
    if (!font && env && strlen(file)<10240)
    {
      char filename[10240];
      sprintf(filename, "%str/%str", env, file);
      font = fopen(filename, "r");
    }

    if (font)
      read_ok = vf_readfontfile(font, vector_font);
    else
      read_ok = vf_readfontstring(file, vector_font);

    if (!read_ok)
    {
      if (font) fclose(font);
      vf_setdefaultfont(vector_font);
      vector_font->file_name[0] = 0;
      return NULL;
    }

    /* guarda nome do arquivo que esta' carregado */
    if (font)
    {
      strcpy(vector_font->file_name, file);
      fclose(font);
    }
    else
      strcpy(vector_font->file_name, vector_font->name);
  }

  return vector_font->name;
}

double* cdCanvasVectorTextTransform(cdCanvas* canvas, const double* matrix)
{
  cdVectorFont* vector_font;
  int i;
  static double old_matrix[6];

  assert(canvas);
  assert(matrix);
  if (!_cdCheckCanvas(canvas)) return NULL;

  vector_font = canvas->vector_font;
  if (vector_font->text_transf)
  {
    for (i=0; i<6; i++)
      old_matrix[i] = vector_font->text_matrix[i];
  }
  else
  {
    old_matrix[0] = 1; old_matrix[1] = 0; old_matrix[2] = 0;
    old_matrix[3] = 0; old_matrix[4] = 1; old_matrix[5] = 0;
  }

  if (matrix)
  {
    for (i=0; i<6; i++)
      vector_font->text_matrix[i] = matrix[i];

    vector_font->text_transf = 1;
  }
  else
    vector_font->text_transf = 0;

  return old_matrix;
}

/******************************************************/
/* vector text em Raster                              */
/******************************************************/

void cdCanvasVectorTextDirection(cdCanvas* canvas, int x1, int y1, int x2, int y2)
{
  cdVectorFont* vector_font;
  int dx, dy;
  double len;

  assert(canvas);
  if (!_cdCheckCanvas(canvas)) return;

  vector_font = canvas->vector_font;

  dx=x2-x1;
  dy=y2-y1;
  len = sqrt(dx*dx +dy*dy);
  if (len == 0) len = 1;
  vector_font->current_sin = dy/len;
  vector_font->current_cos = dx/len;
}

void cdCanvasVectorFontSize(cdCanvas* canvas, double size_x, double size_y)
{
  cdVectorFont* vector_font;

  assert(canvas);
  if (!_cdCheckCanvas(canvas)) return;

  vector_font = canvas->vector_font;

  vector_font->size_x = size_x;
  vector_font->size_y = size_y;
}

void cdCanvasGetVectorFontSize(cdCanvas* canvas, double *size_x, double *size_y)
{
  cdVectorFont* vector_font;

  assert(canvas);
  if (!_cdCheckCanvas(canvas)) return;

  vector_font = canvas->vector_font;

  if (size_x) *size_x = vector_font->size_x;
  if (size_y) *size_y = vector_font->size_y;
}

int cdCanvasVectorCharSize(cdCanvas* canvas, int size)
{
  cdVectorFont* vector_font;
  int old_size;

  assert(canvas);
  if (!_cdCheckCanvas(canvas)) return 0;

  vector_font = canvas->vector_font;
  old_size = cdRound(vector_font->size_y*vector_font->top);
  if (size == CD_QUERY) 
    return old_size;

  vector_font->size_y = size/(double)vector_font->top;
  vector_font->size_x = vector_font->size_y;

  return old_size;
}

void cdCanvasVectorTextSize(cdCanvas* canvas, int s_width, int s_height, const char* str)
{
  int width, height;
  cdVectorFont* vector_font;

  assert(canvas);
  assert(str);
  if (!_cdCheckCanvas(canvas)) return;

  if (str[0] == 0)
    return;

  vector_font = canvas->vector_font;
  vf_gettextsize(vector_font, str, &width, &height);

  vector_font->size_x = (double)s_width/(double)width;
  vector_font->size_y = (double)s_height/(double)height;
}

void cdCanvasGetVectorTextSize(cdCanvas* canvas, const char *str, int *x, int *y)
{
  int width, height;
  cdVectorFont* vector_font;

  assert(canvas);
  assert(str);
  if (!_cdCheckCanvas(canvas)) return;

  if (str[0] == 0)
    return;

  vector_font = canvas->vector_font;

  vf_gettextsize(vector_font, str, &width, &height);

  if (x) *x = cdRound(width*vector_font->size_x);
  if (y) *y = cdRound(height*vector_font->size_y);
}

void cdCanvasGetVectorTextBounds(cdCanvas* canvas, const char *str, int x, int y, int *rect)
{
  cdVectorFont* vector_font;
  int sx, sy;
  int width, height, num_lin;
  double line_height;

  assert(canvas);
  assert(str);
  if (!_cdCheckCanvas(canvas)) return;

  if (str[0] == 0)
    return;

  vector_font = canvas->vector_font;

  vf_gettextsize(vector_font, str, &width, &height);
  num_lin = height/(vector_font->top - vector_font->bottom);

  sx = cdRound(width*vector_font->size_x);
  sy = cdRound(height*vector_font->size_y);

  line_height = (vector_font->top - vector_font->bottom) * vector_font->size_y;

  if (num_lin > 1)
  {
    /* position vertically at the first line */
    int align = canvas->text_alignment;
    vf_move_to_first(vector_font, align, &x, &y, num_lin, line_height);
  }

  /* move to bottom/left corner */
  vf_move_to_base(vector_font, &x, &y, NULL, width);
  vf_move_dir(vector_font, &x, &y, 0, vector_font->bottom*vector_font->size_y);      /* from base/left to bottom/left of the first line */
  if (num_lin > 1)
    vf_move_dir(vector_font, &x, &y, 0, -(height*vector_font->size_y - line_height));  /* from bottom/left to the bottom of the last line */

  vf_calc_point(vector_font, x, y, &rect[0], &rect[1], 0, 0);
  vf_calc_point(vector_font, x, y, &rect[2], &rect[3], sx, 0);
  vf_calc_point(vector_font, x, y, &rect[4], &rect[5], sx, sy);
  vf_calc_point(vector_font, x, y, &rect[6], &rect[7], 0, sy);
}

void cdCanvasGetVectorTextBox(cdCanvas* canvas, int x, int y, const char *str, int *xmin, int *xmax, int *ymin, int *ymax)
{
  int rect[8];
  int _xmin, _xmax, _ymin, _ymax;

  cdCanvasGetVectorTextBounds(canvas, str, x, y, rect);

  _xmin = rect[0];
  _ymin = rect[1];
  _xmax = rect[0];
  _ymax = rect[1];

  if(rect[2] < _xmin) _xmin = rect[2];
  if(rect[4] < _xmin) _xmin = rect[4];
  if(rect[6] < _xmin) _xmin = rect[6];

  if(rect[3] < _ymin) _ymin = rect[3];
  if(rect[5] < _ymin) _ymin = rect[5];
  if(rect[7] < _ymin) _ymin = rect[7];

  if(rect[2] > _xmax) _xmax = rect[2];
  if(rect[4] > _xmax) _xmax = rect[4];
  if(rect[6] > _xmax) _xmax = rect[6];

  if(rect[3] > _ymax) _ymax = rect[3];
  if(rect[5] > _ymax) _ymax = rect[5];
  if(rect[7] > _ymax) _ymax = rect[7];

  if (xmin) *xmin = _xmin;
  if (xmax) *xmax = _xmax;
  if (ymin) *ymin = _ymin;
  if (ymax) *ymax = _ymax;
}

void cdCanvasVectorText(cdCanvas* canvas, int x, int y, const char* str)
{
  cdVectorFont* vector_font;
  int num_lin;

  assert(canvas);
  assert(str);
  if (!_cdCheckCanvas(canvas)) return;

  if (str[0] == 0)
    return;

  vector_font = canvas->vector_font;

  num_lin = cdStrLineCount(str);
  if (num_lin == 1)
    vf_draw_text(vector_font, x, y, str);
  else
  {
    const char *p_str, *q;
    double line_height = (vector_font->top - vector_font->bottom) * vector_font->size_y;
    int i;

    /* position vertically at the first line */
    vf_move_to_first(vector_font, canvas->text_alignment, &x, &y, num_lin, line_height);

    p_str = str;

    for(i = 0; i < num_lin; i++)
    {
      /* Draw the line */
      vf_draw_text(vector_font, x, y, p_str);

      /* Advance the string */
      q = strchr(p_str, '\n');
      if (q) p_str = q + 1;  /* skip line break */

      /* Advance a line */
      vf_move_dir(vector_font, &x, &y, 0, -line_height);
    }
  }
}

void cdCanvasMultiLineVectorText(cdCanvas* canvas, int x, int y, const char* str)
{
  cdCanvasVectorText(canvas, x, y, str);
}

/******************************************************/
/* vector text em WC                                  */
/******************************************************/

void wdCanvasVectorTextDirection(cdCanvas* canvas, double x1, double y1, double x2, double y2)
{
  cdVectorFont* vector_font;
  double dx, dy, len;

  assert(canvas);
  if (!_cdCheckCanvas(canvas)) return;

  vector_font = canvas->vector_font;

  dx=x2-x1;
  dy=y2-y1;
  len = sqrt(dx*dx +dy*dy);
  if (len == 0) len = 1;
  vector_font->current_sin = dy/len;
  vector_font->current_cos = dx/len;
}

double wdCanvasVectorCharSize(cdCanvas* canvas, double size)
{
  cdVectorFont* vector_font;
  double old_size;

  assert(canvas);
  if (!_cdCheckCanvas(canvas)) return 0;

  vector_font = canvas->vector_font;
  old_size = vector_font->size_y*vector_font->top;
  if (size == CD_QUERY) 
    return old_size;

  vector_font->size_y = size/(double)vector_font->top;
  vector_font->size_x = vector_font->size_y;

  return old_size;
}

void wdCanvasVectorTextSize(cdCanvas* canvas, double s_width, double s_height, const char* str)
{
  int width, height;
  cdVectorFont* vector_font;

  assert(canvas);
  assert(str);
  if (!_cdCheckCanvas(canvas)) return;

  if (str[0] == 0)
    return;

  vector_font = canvas->vector_font;
  vf_gettextsize(vector_font, str, &width, &height);

  vector_font->size_x = s_width/(double)width;
  vector_font->size_y = s_height/(double)height;
}

void wdCanvasGetVectorTextSize(cdCanvas* canvas, const char *str, double *x, double *y)
{
  int width, height;
  cdVectorFont* vector_font;

  assert(canvas);
  assert(str);
  if (!_cdCheckCanvas(canvas)) return;

  if (str[0] == 0)
    return;

  vector_font = canvas->vector_font;

  vf_gettextsize(vector_font, str, &width, &height);

  if (x) *x = width*vector_font->size_x;
  if (y) *y = height*vector_font->size_y;
}

void wdCanvasGetVectorTextBounds(cdCanvas* canvas, const char *str, double x, double y, double *rect)
{
  cdVectorFont* vector_font;
  double sx, sy, line_height;
  int width, height, num_lin;

  assert(canvas);
  assert(str);
  if (!_cdCheckCanvas(canvas)) return;

  if (str[0] == 0)
    return;

  vector_font = canvas->vector_font;

  vf_gettextsize(vector_font, str, &width, &height);
  num_lin = height/(vector_font->top - vector_font->bottom);

  sx = width*vector_font->size_x;
  sy = height*vector_font->size_y;

  line_height = (vector_font->top - vector_font->bottom) * vector_font->size_y;

  if (num_lin > 1)
  {
    /* position vertically at the first line */
    int align = canvas->text_alignment;
    vf_wmove_to_first(vector_font, align, &x, &y, num_lin, line_height);
  }

  /* move to bottom/left corner */
  vf_wmove_to_base(vector_font, &x, &y, NULL, width);
  vf_wmove_dir(vector_font, &x, &y, 0, vector_font->bottom*vector_font->size_y);      /* from base/left to bottom/left of the first line */
  if (num_lin > 1)
    vf_wmove_dir(vector_font, &x, &y, 0, -(height*vector_font->size_y - line_height));  /* from bottom/left to the bottom of the last line */

  vf_wcalc_point(vector_font, x, y, &rect[0], &rect[1], 0, 0);
  vf_wcalc_point(vector_font, x, y, &rect[2], &rect[3], sx, 0);
  vf_wcalc_point(vector_font, x, y, &rect[4], &rect[5], sx, sy);
  vf_wcalc_point(vector_font, x, y, &rect[6], &rect[7], 0, sy);
}

void wdCanvasGetVectorTextBox(cdCanvas* canvas, double x, double y, const char *str, double *xmin, double *xmax, double *ymin, double *ymax)
{
  double rect[8];
  double _xmin, _xmax, _ymin, _ymax;

  wdCanvasGetVectorTextBounds(canvas, str, x, y, rect);

  _xmin = rect[0];
  _ymin = rect[1];
  _xmax = rect[0];
  _ymax = rect[1];

  if(rect[2] < _xmin) _xmin = rect[2];
  if(rect[4] < _xmin) _xmin = rect[4];
  if(rect[6] < _xmin) _xmin = rect[6];

  if(rect[3] < _ymin) _ymin = rect[3];
  if(rect[5] < _ymin) _ymin = rect[5];
  if(rect[7] < _ymin) _ymin = rect[7];

  if(rect[2] > _xmax) _xmax = rect[2];
  if(rect[4] > _xmax) _xmax = rect[4];
  if(rect[6] > _xmax) _xmax = rect[6];

  if(rect[3] > _ymax) _ymax = rect[3];
  if(rect[5] > _ymax) _ymax = rect[5];
  if(rect[7] > _ymax) _ymax = rect[7];

  if (xmin) *xmin = _xmin;
  if (xmax) *xmax = _xmax;
  if (ymin) *ymin = _ymin;
  if (ymax) *ymax = _ymax;
}

void wdCanvasVectorText(cdCanvas* canvas, double x, double y, const char* str)
{
  cdVectorFont* vector_font;
  int num_lin;

  assert(canvas);
  assert(str);
  if (!_cdCheckCanvas(canvas)) return;

  if (str[0] == 0)
    return;

  vector_font = canvas->vector_font;

  num_lin = cdStrLineCount(str);
  if (num_lin == 1)
    vf_wdraw_text(vector_font, x, y, str);
  else
  {
    const char *p_str, *q;
    double line_height = (vector_font->top - vector_font->bottom) * vector_font->size_y;
    int i;

    /* position vertically at the first line */
    vf_wmove_to_first(vector_font, canvas->text_alignment, &x, &y, num_lin, line_height);

    p_str = str;

    for(i = 0; i < num_lin; i++)
    {
      /* Draw the line */
      vf_wdraw_text(vector_font, x, y, p_str);

      /* Advance the string */
      q = strchr(p_str, '\n');
      if (q) p_str = q + 1; /* skip line break */

      /* Advance a line */
      vf_wmove_dir(vector_font, &x, &y, 0, -line_height);
    }
  }
}

void wdCanvasMultiLineVectorText(cdCanvas* canvas, double x, double y, const char* str)
{
  wdCanvasVectorText(canvas, x, y, str);
}