Example: Changed glyph-outline.shape for use with FontConfig.
[shapes.git] / source / consts.cc
blob93f7b61a2a34c4ec4abed7737dcd18a5119dce1b
1 /* This file is part of Shapes.
3 * Shapes is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * any later version.
8 * Shapes is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with Shapes. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright 2008 Henrik Tidefelt
19 #include "Shapes_Kernel_decls.h"
21 #include "consts.h"
22 #include "shapesexceptions.h"
23 #include "classtypes.h"
24 #include "statetypes.h"
25 #include "fonttypes.h"
27 using namespace Shapes;
29 RefCountPtr< const char > Interaction::SEVERAL_TYPES = strrefdup( "(several types)" );
30 RefCountPtr< const char > Interaction::PUBLIC_SCOPE_NAME = strrefdup( "public" );
31 RefCountPtr< const char > Interaction::PROTECTED_SCOPE_NAME = strrefdup( "protected" );
33 const char * Interaction::DYNAMIC_VARIABLE_PREFIX = "@";
34 const char * Interaction::STATE_PREFIX = "•";
36 const char * Interaction::BUILD_REQ_LIBJPEG = "JPEG";
37 const char * Interaction::BUILD_REQ_LIBPNG = "PNG";
38 const char * Interaction::BUILD_REQ_FREETYPE = "FreeType";
39 const char * Interaction::BUILD_REQ_FONTCONFIG = "FontConfig";
41 RefCountPtr< const char > Lang::ARCDELTA_ID = strrefdup( "arcdelta" );
42 /* The initialization of Lang::TEX_SYNTAX_ID is placed in globals.cc to ensure it gets initialized before we need it there.
44 // RefCountPtr< const char > Lang::TEX_SYNTAX_ID = strrefdup( "teX" );
46 const char * Lang::CANVAS_ID = "page";
47 const char * Lang::CATALOG_ID = "catalog";
48 const char * Lang::SELF_ID = "self";
49 const char * Kernel::SEQUENTIAL_EXPR_VAR_ID = ".seqvar"; /* Note that the leading dot puts this variable aside all user-variables. */
50 const char * Kernel::SPLIT_VAR_PREFIX = ".splvar"; /* Note that the leading dot puts this variable aside all user-variables. */
51 const char * Kernel::HTML_DIR = HTML_DIRDEF;
52 const char * Kernel::RESOURCES_DIR = RESOURCES_DIRDEF;
54 const char * Lang::DYNAMIC_VARIABLE_ID_EYEZ = "eyez";
55 const char * Lang::DYNAMIC_VARIABLE_ID_TEX_BLEED = "TeX_bleed";
56 const char * Lang::DYNAMIC_VARIABLE_ID_DEFAULT_UNIT = "defaultunit";
57 const char * Lang::DYNAMIC_VARIABLE_ID_BLEND_SPACE = "blendspace";
58 const char * Lang::DYNAMIC_VARIABLE_ID_STROKING = "stroking";
59 const char * Lang::DYNAMIC_VARIABLE_ID_WIDTH = "width";
60 const char * Lang::DYNAMIC_VARIABLE_ID_NONSTROKING = "nonstroking";
61 const char * Lang::DYNAMIC_VARIABLE_ID_AUTOINTENSITY = "autointensity";
63 const char * Lang::DYNAMIC_VARIABLE_ID_TEXT_SIZE = "text_size";
64 const char * Lang::DYNAMIC_VARIABLE_ID_TEXT_FONT = "text_font";
66 const char * Lang::CONTINUATION_ID_ERROR = "error";
68 const Ast::MemberMode Ast::MEMBER_ACCESS_BITS = 0x000F;
69 const Ast::MemberMode Ast::MEMBER_ACCESS_PRIVATE = 0x0000;
70 const Ast::MemberMode Ast::MEMBER_ACCESS_PUBLIC_GET = 0x0001;
71 const Ast::MemberMode Ast::MEMBER_ACCESS_PUBLIC_INSERT = 0x0002;
72 const Ast::MemberMode Ast::MEMBER_ACCESS_PROTECTED_GET = 0x0004;
73 const Ast::MemberMode Ast::MEMBER_ACCESS_PROTECTED_INSERT = 0x0008;
74 const Ast::MemberMode Ast::MEMBER_CONST = 0x0010;
75 const Ast::MemberMode Ast::MEMBER_METHOD = 0x0020;
76 const Ast::MemberMode Ast::MEMBER_ABSTRACT = 0x0040;
77 const Ast::MemberMode Ast::MEMBER_FINAL = 0x0080;
78 const Ast::MemberMode Ast::MEMBER_TRANSFORMING = 0x0100;
80 const Ast::ClassMode Ast::CLASS_MODE_ABSTRACT = 0x0001;
81 const Ast::ClassMode Ast::CLASS_MODE_FINAL = 0x0002;
83 const Ast::FunctionMode Ast::FUNCTION_TRANSFORMING = 0x0001;
85 const char * Lang::MESSAGE_DRAWABLE_DRAW_ID = "draw";
87 const char * Lang::HANDLER_NO_INTERSECTION = "handler_NoIntersection";
89 const double Computation::SINGULAR_TRANSFORM_LIMIT = 1e-8;
92 RefCountPtr< const char > BuiltInFonts::TIMES_ROMAN = strrefdup( "Times-Roman" );
93 RefCountPtr< const char > BuiltInFonts::TIMES_BOLD = strrefdup( "Times-Bold" );
94 RefCountPtr< const char > BuiltInFonts::TIMES_ITALIC = strrefdup( "Times-Italic" );
95 RefCountPtr< const char > BuiltInFonts::TIMES_BOLDITALIC = strrefdup( "Times-BoldItalic" );
96 // HELVETICA is initialized in globals.cc to ensure correct order of initialization.
97 RefCountPtr< const char > BuiltInFonts::HELVETICA_BOLD = strrefdup( "Helvetica-Bold" );
98 RefCountPtr< const char > BuiltInFonts::HELVETICA_OBLIQUE = strrefdup( "Helvetica-Oblique" );
99 RefCountPtr< const char > BuiltInFonts::HELVETICA_BOLDOBLIQUE = strrefdup( "Helvetica-BoldOblique" );
100 RefCountPtr< const char > BuiltInFonts::COURIER = strrefdup( "Courier" );
101 RefCountPtr< const char > BuiltInFonts::COURIER_BOLD = strrefdup( "Courier-Bold" );
102 RefCountPtr< const char > BuiltInFonts::COURIER_OBLIQUE = strrefdup( "Courier-Oblique" );
103 RefCountPtr< const char > BuiltInFonts::COURIER_BOLDOBLIQUE = strrefdup( "Courier-BoldOblique" );
104 RefCountPtr< const char > BuiltInFonts::SYMBOL = strrefdup( "Symbol" );
105 RefCountPtr< const char > BuiltInFonts::ZAPFDINGBATS = strrefdup( "ZapfDingbats" );
108 const size_t Computation::RREL_SIZE = 33;
109 const double Computation::RREL_TH_STEP = 0.1;
110 const double Computation::RREL_TABLE[RREL_SIZE] =
111 { 1/3,0.3341686344960354,0.33668841107954134,
112 0.3409422096583605,0.34701519474761894,
113 0.35502910405887494,0.36514854168289823,
114 0.3775911942845651,0.3926341399960872,
115 0.41062983298282885,0.43202211298939736,
116 0.45737337400783484,0.4873946524706331,
117 0.522992662410542,0.5653317708668038,
118 0.6159221561762755,0.6767424374123584,
119 0.7504184408114359,0.8404852622717847,
120 0.9517742868557572,1.0910034113732654,
121 1.267683405767762,1.4955440295942208,
122 1.7947857010553352,2.1956618428196286,
123 2.7440092614738933,3.5090279091817442,
124 4.590771723726686,6.112526284299868,8.144027798714662,
125 10.441038625842998,12.076454051457787,13};