/***************************************************************************/
/* */
/* ttinterp.c */
/* */
/* TrueType bytecode interpreter (body). */
/* */
/* Copyright 1996-2014 */
/* by David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
/* Greg Hitchcock from Microsoft has helped a lot in resolving unclear */
/* issues; many thanks! */
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_CALC_H
#include FT_TRIGONOMETRY_H
#include FT_SYSTEM_H
#include FT_TRUETYPE_DRIVER_H
#include "ttinterp.h"
#include "tterrors.h"
#include "ttsubpix.h"
#ifdef TT_USE_BYTECODE_INTERPRETER
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
/* messages during execution. */
/* */
#undef FT_COMPONENT
#define FT_COMPONENT trace_ttinterp
/*************************************************************************/
/* */
/* In order to detect infinite loops in the code, we set up a counter */
/* within the run loop. A single stroke of interpretation is now */
/* limited to a maximum number of opcodes defined below. */
/* */
#define MAX_RUNNABLE_OPCODES 1000000L
/*************************************************************************/
/* */
/* There are two kinds of implementations: */
/* */
/* a. static implementation */
/* */
/* The current execution context is a static variable, which fields */
/* are accessed directly by the interpreter during execution. The */
/* context is named `cur'. */
/* */
/* This version is non-reentrant, of course. */
/* */
/* b. indirect implementation */
/* */
/* The current execution context is passed to _each_ function as its */
/* first argument, and each field is thus accessed indirectly. */
/* */
/* This version is fully re-entrant. */
/* */
/* The idea is that an indirect implementation may be slower to execute */
/* on low-end processors that are used in some systems (like 386s or */
/* even 486s). */
/* */
/* As a consequence, the indirect implementation is now the default, as */
/* its performance costs can be considered negligible in our context. */
/* Note, however, that we kept the same source with macros because: */
/* */
/* - The code is kept very close in design to the Pascal code used for */
/* development. */
/* */
/* - It's much more readable that way! */
/* */
/* - It's still open to experimentation and tuning. */
/* */
/*************************************************************************/
#ifndef TT_CONFIG_OPTION_STATIC_INTERPRETER /* indirect implementation */
#define CUR (*exc) /* see ttobjs.h */
/*************************************************************************/
/* */
/* This macro is used whenever `exec' is unused in a function, to avoid */
/* stupid warnings from pedantic compilers. */
/* */
#define FT_UNUSED_EXEC FT_UNUSED( exc )
#else /* static implementation */
#define CUR cur
#define FT_UNUSED_EXEC int __dummy = __dummy
static
TT_ExecContextRec cur; /* static exec. context variable */
/* apparently, we have a _lot_ of direct indexing when accessing */
/* the static `cur', which makes the code bigger (due to all the */
/* four bytes addresses). */
#endif /* TT_CONFIG_OPTION_STATIC_INTERPRETER */
/*************************************************************************/
/* */
/* The instruction argument stack. */
/* */
#define INS_ARG EXEC_OP_ FT_Long* args /* see ttobjs.h for EXEC_OP_ */
/*************************************************************************/
/* */
/* This macro is used whenever `args' is unused in a function, to avoid */
/* stupid warnings from pedantic compilers. */
/* */
#define FT_UNUSED_ARG FT_UNUSED_EXEC; FT_UNUSED( args )
#define SUBPIXEL_HINTING \
( ((TT_Driver)FT_FACE_DRIVER( CUR.face ))->interpreter_version == \
TT_INTERPRETER_VERSION_38 )
/*************************************************************************/
/* */
/* The following macros hide the use of EXEC_ARG and EXEC_ARG_ to */
/* increase readability of the code. */
/*
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
opencv中嵌入中英文字符-附件包.zip (553个子文件)
ttinterp.c 301KB
ftobjs.c 139KB
ftraster.c 121KB
ttcmap.c 109KB
cffgload.c 95KB
aflatin.c 90KB
ttgload.c 83KB
bdflib.c 78KB
aflatin2.c 72KB
t1load.c 72KB
ftstroke.c 68KB
afcjk.c 66KB
cf2hints.c 63KB
pshalgo.c 63KB
ftgrays.c 62KB
ttgxvar.c 57KB
gxvcommn.c 56KB
sfobjs.c 52KB
t1decode.c 51KB
psobjs.c 51KB
ttload.c 49KB
cffload.c 49KB
cf2intrp.c 47KB
ttobjs.c 46KB
ttsbit.c 42KB
afhints.c 39KB
t42parse.c 38KB
pcfread.c 37KB
winfnt.c 35KB
ftmac.c 34KB
cffobjs.c 34KB
ttsubpix.c 33KB
pshrec.c 33KB
cffparse.c 32KB
otvgpos.c 30KB
ftoutln.c 29KB
gxvkern.c 29KB
otvcommn.c 29KB
ftrfork.c 28KB
cffdrivr.c 26KB
pfrload.c 26KB
ftdbgmem.c 25KB
bdfdrivr.c 25KB
ftcalc.c 24KB
pshglob.c 23KB
pfrgload.c 23KB
afmparse.c 23KB
t1driver.c 23KB
gxvjust.c 22KB
ftbbox.c 21KB
cf2ft.c 21KB
t1objs.c 21KB
t42objs.c 21KB
cf2blues.c 21KB
ttpload.c 21KB
ftstream.c 20KB
ftgzip.c 20KB
ttdriver.c 20KB
afloader.c 19KB
ftbitmap.c 19KB
cf2font.c 19KB
cidload.c 19KB
pfrsbit.c 19KB
otvgsub.c 18KB
t1gload.c 18KB
pcfdrivr.c 18KB
pfrobjs.c 18KB
ftcmanag.c 18KB
ftglyph.c 18KB
t1parse.c 17KB
hbshim.c 17KB
ttpost.c 17KB
cidobjs.c 17KB
ftcbasic.c 17KB
ftrandom.c 16KB
inftrees.c 16KB
gxvfgen.c 16KB
cidgload.c 16KB
ftccache.c 15KB
psmodule.c 15KB
otvmath.c 15KB
afblue.c 14KB
ftsystem.c 14KB
sfdriver.c 14KB
ftbzip2.c 14KB
ftsmooth.c 14KB
ftgloadr.c 13KB
afglobal.c 13KB
ftcsbits.c 13KB
psconv.c 13KB
infblock.c 12KB
fttrigon.c 12KB
gxvmorx2.c 12KB
gxvprop.c 11KB
afwarp.c 11KB
t1afm.c 11KB
gxvfeat.c 11KB
gxvmort2.c 11KB
ftzopen.c 11KB
ftlzw.c 11KB
共 553 条
- 1
- 2
- 3
- 4
- 5
- 6
hujingshuang
- 粉丝: 1202
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 公开整理-县人口密度数据集(2000-2023年) .xlsx
- 公开整理-市人口密度数据集(2000-2023年) .xlsx
- 自动从pdf提取结构化目录
- CEPII地理距离数据中的国家代码
- vip-2024.1129.-4 - iperf3-with-timestamp-Linux-shell-ser
- iperf3-with-timestamp-Linux-shell-cli
- dfasfzsdfasfd
- 2024年Java期末作业 二手市产项目(二手市场自由交易系统).zip、(含sql文件)
- LibreOffice-7.5.3.2-Linux-x86-64-rpm
- FPGA算法工程文件:移动目标,工程模板
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页