Commit 80a713d8 authored by charras's avatar charras

commit hershey patch

parent 42b4cae4
/********************************************************/
/* methodes pour les structures de base: */
/* EDA_BaseStruct (classe non utilisable seule) */
/* EDA_TextStruct (classe non utilisable seule) */
/********************************************************/
/****************************************/
/* Basic classes for Kicad: */
/* EDA_BaseStruct */
/* EDA_TextStruct */
/****************************************/
/* Fichier base_struct.cpp */
......@@ -10,7 +10,6 @@
#include "gr_basic.h"
#include "trigo.h"
#include "common.h"
#include "grfonte.h"
#include "macros.h"
#include "wxstruct.h"
#include "class_drawpanel.h"
......
......@@ -18,7 +18,7 @@
#endif
#define EDA_DRAWBASE
#include "hershey.h"
#include "hershey_fonts.h"
#define HERSHEY_SIZE 32.0
......
......@@ -7,7 +7,6 @@
#include "common.h"
#include "plot_common.h"
#include "worksheet.h"
#include "grfonte.h"
#include "base_struct.h"
#include "drawtxt.h"
#include "trigo.h"
......
/* Hershey fonts */
/*
* Hershey fonts are vectored fonts.
* Note one can find many formats for these vectored fonts
* here is the formats used :
* >shapes are a set of polygons.
* >A given shape includes one or more polygons.
* >corner coordinates are coded by a XY pair.
* >The value of each coordinate is <ascii code> - 'R'
* >The coordinate (-50,0) or " R" is the Pen Up command (end of the current polygon)
*/
/* Hershey Simplex Roman (sans) definition */
const static char* hershey_simplex[] =
{
"JZ",
"MWRFRT RRYQZR[SZRY",
"JZNFNM RVFVM",
"H]SBLb RYBRb RLOZO RKUYU",
"H\\PBP_ RTBT_ RYIWGTFPFMGKIKKLMMNOOUQWRXSYUYXWZT[P[MZKX",
"F^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWT",
"E_\\O\\N[MZMYNXPVUTXRZP[L[JZIYHWHUISJRQNRMSKSIRGPFNGMIMKNNPQUXWZY[[[\\Z\\Y",
"MWRHQGRFSGSIRKQL",
"KYVBTDRGPKOPOTPYR]T`Vb",
"KYNBPDRGTKUPUTTYR]P`Nb",
"JZRFRR RMIWO RWIMO",
"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",
"H\\LMLbMb RLMMMMb RMPONQMTMVNXPYSYUXXVZT[Q[OZMX RMPQNTNVOWPXSXUWXVYTZQZMX",
"H\\WMWbXb RWMXMXb RWPUNSMPMNNLPKSKULXNZP[S[UZWX RWPSNPNNOMPLSLUMXNYPZSZWX",
"KYOMO[P[ ROMPMP[ RPSQPSNUMXM RPSQQSOUNXNXM",
"J[XPWNTMQMNNMPNRPSUUWV RVUWWWXVZ RWYTZQZNY ROZNXMX RXPWPVN RWOTNQNNO RONNPOR RNQPRUTWUXWXXWZT[Q[NZMX",
"MXRFR[S[ RRFSFS[ ROMVMVN ROMONVN",
"H\\LMLWMZO[R[TZWW RLMMMMWNYPZRZTYWW RWMW[X[ RWMXMX[",
"JZLMR[ RLMMMRY RXMWMRY RXMR[",
"F^IMN[ RIMJMNX RRMNX RRPN[ RRPV[ RRMVX R[MZMVX R[MV[",
"I[LMW[X[ RLMMMX[ RXMWML[ RXMM[L[",
"JZLMR[ RLMMMRY RXMWMRYNb RXMR[ObNb",
"I[VNL[ RXMNZ RLMXM RLMLNVN RNZXZX[ RL[X[",
"KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb",
"NVRBRb",
"KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb",
"F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O",
"KYQFOGNINKOMQNSNUMVKVIUGSFQF RQFNIOMSNVKUGQF RSFOGNKQNUMVISF"
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment