⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vectorfont.c

📁 CNC.rar
💻 C
📖 第 1 页 / 共 2 页
字号:
//*****************************************************************************
//
// vectorfont.c - Hershey simplex vector font.
//
// Copyright (c) 2006-2007 Luminary Micro, Inc.  All rights reserved.
//
// Software License Agreement
//
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's microcontroller products.
//
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws.  All rights are reserved.  Any use in violation
// of the foregoing restrictions may subject the user to criminal sanctions
// under applicable laws, as well as to civil liability for the breach of the
// terms and conditions of this license.
//
// THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 220 of sw01246.
//
//*****************************************************************************

#include "vectorfont.h"

//*****************************************************************************
//
//! \page main_vectorfont_intro Introduction
//!
//! A Hershey Simplex Roman vector font is used for drawing text on the CNC
//! machine.  The Hershey font is a public domain vector font comprised of
//! numerous type faces and stroke widths.  The simplex version has a single
//! stroke per line in the character (for example, there are three strokes in
//! the letter "H", two vertical and one horizontal).  The roman face is the
//! default Hershey font, and is a sans serif font face.
//!
//! The data in this font array is based on the data created by Paul Bourke
//! from the Hershey font data; the original data is available at
//! <a href="http://local.wasp.uwa.edu.au/~pbourke/dataformats/hershey">
//! http://local.wasp.uwa.edu.au/~pbourke/dataformats/hershey</a>.
//!
//! The Hershey Fonts were originally created by Dr. A. V. Hershey while
//! working at the U. S. National Bureau of Standards.
//!
//! The array containing the Hershey vector font is contained in
//! <tt>main_micro/vectorfont.c</tt>, with <tt>main_micro/vectorfont.h</tt>
//! containing the API defintions for use by the remainder of the application.
//
//*****************************************************************************

//*****************************************************************************
//
//! \defgroup main_vectorfont_api Definitions
//! @{
//
//*****************************************************************************

//*****************************************************************************
//
//! The Hershey simplex vector font.  There is one string per character, and
//! each string is formatted as follows:  the first byte is the number of
//! coordinate pairs in the character, the second byte is the width of the
//! character (including white space), and the remaining bytes are the
//! coordinate pairs (with "\377\377" indicate a pen lift).
//
//*****************************************************************************
const char * const g_ppcFont[] =
{
    //
    // ASCII 32
    //
    "\000\020",

    //
    // ASCII 33
    //
    "\010\012\005\025\005\007\377\377\005\002\004\001\005\000\006\001\005\002",

    //
    // ASCII 34
    //
    "\005\020\004\025\004\016\377\377\014\025\014\016",

    //
    // ASCII 35
    //
    "\013\025\013\031\004\371\377\377\021\031\012\371\377\377\004\014\022\014"
    "\377\377\003\006\021\006",

    //
    // ASCII 36
    //
    "\032\024\010\031\010\374\377\377\014\031\014\374\377\377\021\022\017\024"
    "\014\025\010\025\005\024\003\022\003\020\004\016\005\015\007\014\015\012"
    "\017\011\020\010\021\006\021\003\017\001\014\000\010\000\005\001\003\003",

    //
    // ASCII 37
    //
    "\037\030\025\025\003\000\377\377\010\025\012\023\012\021\011\017\007\016"
    "\005\016\003\020\003\022\004\024\006\025\010\025\012\024\015\023\020\023"
    "\023\024\025\025\377\377\021\007\017\006\016\004\016\002\020\000\022\000"
    "\024\001\025\003\025\005\023\007\021\007",

    //
    // ASCII 38
    //
    "\042\032\027\014\027\015\026\016\025\016\024\015\023\013\021\006\017\003"
    "\015\001\013\000\007\000\005\001\004\002\003\004\003\006\004\010\005\011"
    "\014\015\015\016\016\020\016\022\015\024\013\025\011\024\010\022\010\020"
    "\011\015\013\012\020\003\022\001\024\000\026\000\027\001\027\002",

    //
    // ASCII 39
    //
    "\007\012\005\023\004\024\005\025\006\024\006\022\005\020\004\017",

    //
    // ASCII 40
    //
    "\012\016\013\031\011\027\007\024\005\020\004\013\004\007\005\002\007\376"
    "\011\373\013\371",

    //
    // ASCII 41
    //
    "\012\016\003\031\005\027\007\024\011\020\012\013\012\007\011\002\007\376"
    "\005\373\003\371",

    //
    // ASCII 42
    //
    "\010\020\010\025\010\011\377\377\003\022\015\014\377\377\015\022\003\014",

    //
    // ASCII 43
    //
    "\005\032\015\022\015\000\377\377\004\011\026\011",

    //
    // ASCII 44
    //
    "\010\012\006\001\005\000\004\001\005\002\006\001\006\377\005\375\004\374",

    //
    // ASCII 45
    //
    "\002\032\004\011\026\011",

    //
    // ASCII 46
    //
    "\005\012\005\002\004\001\005\000\006\001\005\002",

    //
    // ASCII 47
    //
    "\002\026\024\031\002\371",

    //
    // ASCII 48
    //
    "\021\024\011\025\006\024\004\021\003\014\003\011\004\004\006\001\011\000"
    "\013\000\016\001\020\004\021\011\021\014\020\021\016\024\013\025\011\025",

    //
    // ASCII 49
    //
    "\004\024\006\021\010\022\013\025\013\000",

    //
    // ASCII 50
    //
    "\016\024\004\020\004\021\005\023\006\024\010\025\014\025\016\024\017\023"
    "\020\021\020\017\017\015\015\012\003\000\021\000",

    //
    // ASCII 51
    //
    "\017\024\005\025\020\025\012\015\015\015\017\014\020\013\021\010\021\006"
    "\020\003\016\001\013\000\010\000\005\001\004\002\003\004",

    //
    // ASCII 52
    //
    "\004\024\015\000\015\025\003\007\022\007",

    //
    // ASCII 53
    //
    "\021\024\017\025\005\025\004\014\005\015\010\016\013\016\016\015\020\013"
    "\021\010\021\006\020\003\016\001\013\000\010\000\005\001\004\002\003\004",

    //
    // ASCII 54
    //
    "\027\024\020\022\017\024\014\025\012\025\007\024\005\021\004\014\004\007"
    "\005\003\007\001\012\000\013\000\016\001\020\003\021\006\021\007\020\012"
    "\016\014\013\015\012\015\007\014\005\012\004\007",

    //
    // ASCII 55
    //
    "\003\024\003\025\021\025\007\000",

    //
    // ASCII 56
    //
    "\035\024\010\025\005\024\004\022\004\020\005\016\007\015\013\014\016\013"
    "\020\011\021\007\021\004\020\002\017\001\014\000\010\000\005\001\004\002"
    "\003\004\003\007\004\011\006\013\011\014\015\015\017\016\020\020\020\022"
    "\017\024\014\025\010\025",

    //
    // ASCII 57
    //
    "\027\024\020\016\017\013\015\011\012\010\011\010\006\011\004\013\003\016"
    "\003\017\004\022\006\024\011\025\012\025\015\024\017\022\020\016\020\011"
    "\017\004\015\001\012\000\010\000\005\001\004\003",

    //
    // ASCII 58
    //
    "\013\012\005\016\004\015\005\014\006\015\005\016\377\377\005\002\004\001"
    "\005\000\006\001\005\002",

    //
    // ASCII 59
    //
    "\016\012\005\016\004\015\005\014\006\015\005\016\377\377\006\001\005\000"
    "\004\001\005\002\006\001\006\377\005\375\004\374",

    //
    // ASCII 60
    //
    "\003\030\024\022\004\011\024\000",

    //
    // ASCII 61
    //
    "\005\032\004\014\026\014\377\377\004\006\026\006",

    //
    // ASCII 62
    //
    "\003\030\004\022\024\011\004\000",

    //
    // ASCII 63
    //
    "\024\022\003\020\003\021\004\023\005\024\007\025\013\025\015\024\016\023"
    "\017\021\017\017\016\015\015\014\011\012\011\007\377\377\011\002\010\001"
    "\011\000\012\001\011\002",

    //
    // ASCII 64
    //
    "\067\033\022\015\021\017\017\020\014\020\012\017\011\016\010\013\010\010"
    "\011\006\013\005\016\005\020\006\021\010\377\377\014\020\012\016\011\013"
    "\011\010\012\006\013\005\377\377\022\020\021\010\021\006\023\005\025\005"
    "\027\007\030\012\030\014\027\017\026\021\024\023\022\024\017\025\014\025"
    "\011\024\007\023\005\021\004\017\003\014\003\011\004\006\005\004\007\002"
    "\011\001\014\000\017\000\022\001\024\002\025\003\377\377\023\020\022\010"
    "\022\006\023\005",

    //
    // ASCII 65
    //
    "\006\022\001\000\011\025\021\000\377\377\004\007\016\007",

    //
    // ASCII 66
    //
    "\025\025\004\000\004\025\015\025\020\024\021\023\022\021\022\017\021\015"
    "\020\014\015\013\377\377\004\013\015\013\020\012\021\011\022\007\022\004"
    "\021\002\020\001\015\000\004\000",

    //
    // ASCII 67
    //
    "\022\025\022\020\021\022\017\024\015\025\011\025\007\024\005\022\004\020"
    "\003\015\003\010\004\005\005\003\007\001\011\000\015\000\017\001\021\003"
    "\022\005",

    //
    // ASCII 68
    //
    "\015\025\004\000\004\025\013\025\016\024\020\022\021\020\022\015\022\010"
    "\021\005\020\003\016\001\013\000\004\000",

    //
    // ASCII 69
    //
    "\007\023\021\025\004\025\004\000\021\000\377\377\004\013\014\013",

    //
    // ASCII 70
    //
    "\006\022\021\025\004\025\004\000\377\377\004\013\014\013",

    //
    // ASCII 71
    //
    "\024\025\022\020\021\022\017\024\015\025\011\025\007\024\005\022\004\020"
    "\003\015\003\010\004\005\005\003\007\001\011\000\015\000\017\001\021\003"
    "\022\005\022\010\015\010",

    //
    // ASCII 72
    //
    "\010\026\004\025\004\000\377\377\022\025\022\000\377\377\004\013\022\013",

    //
    // ASCII 73

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -