File: Font_pre.cpp

package info (click to toggle)
python-ocp 7.8.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 64,724 kB
  • sloc: cpp: 362,337; pascal: 33; python: 23; makefile: 4
file content (136 lines) | stat: -rw-r--r-- 6,837 bytes parent folder | download | duplicates (2)
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

// pybind 11 related includes
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

namespace py = pybind11;


// Standard Handle
#include <Standard_Handle.hxx>

// user-defined inclusion per module before includes

// includes to resolve forward declarations
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Font_FTLibrary.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <NCollection_Buffer.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Font_FTFont.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>

// module includes
#include <Font_BRepFont.hxx>
#include <Font_BRepTextBuilder.hxx>
#include <Font_FontAspect.hxx>
#include <Font_FontMgr.hxx>
#include <Font_FTFont.hxx>
#include <Font_FTLibrary.hxx>
#include <Font_Hinting.hxx>
#include <Font_NameOfFont.hxx>
#include <Font_NListOfSystemFont.hxx>
#include <Font_Rect.hxx>
#include <Font_StrictLevel.hxx>
#include <Font_SystemFont.hxx>
#include <Font_TextFormatter.hxx>
#include <Font_UnicodeSubset.hxx>

// template related includes

#include "NCollection_tmpl.hxx"


// user-defined pre
#include "OCP_specific.inc"

// user-defined inclusion per module
struct FT_LibraryRec_ {};

// Module definiiton
void register_Font_enums(py::module &main_module) {


py::module m = main_module.def_submodule("Font", R"#()#");

// user-defined inclusion per module in the body

// enums
    py::enum_<Font_StrictLevel>(m, "Font_StrictLevel",R"#(Enumeration defining font search restrictions.)#")
        .value("Font_StrictLevel_Strict",Font_StrictLevel::Font_StrictLevel_Strict)
        .value("Font_StrictLevel_Aliases",Font_StrictLevel::Font_StrictLevel_Aliases)
        .value("Font_StrictLevel_Any",Font_StrictLevel::Font_StrictLevel_Any).export_values();
    py::enum_<Font_FontAspect>(m, "Font_FontAspect",R"#(Specifies aspect of system font.)#")
        .value("Font_FontAspect_UNDEFINED",Font_FontAspect::Font_FontAspect_UNDEFINED)
        .value("Font_FontAspect_Regular",Font_FontAspect::Font_FontAspect_Regular)
        .value("Font_FontAspect_Bold",Font_FontAspect::Font_FontAspect_Bold)
        .value("Font_FontAspect_Italic",Font_FontAspect::Font_FontAspect_Italic)
        .value("Font_FontAspect_BoldItalic",Font_FontAspect::Font_FontAspect_BoldItalic)
        .value("Font_FA_Undefined",Font_FontAspect::Font_FA_Undefined)
        .value("Font_FA_Regular",Font_FontAspect::Font_FA_Regular)
        .value("Font_FA_Bold",Font_FontAspect::Font_FA_Bold)
        .value("Font_FA_Italic",Font_FontAspect::Font_FA_Italic)
        .value("Font_FA_BoldItalic",Font_FontAspect::Font_FA_BoldItalic).export_values();
    m.attr("Font_FontAspect_NB") = py::cast(int(Font_FontAspect_NB));
    py::enum_<Font_Hinting>(m, "Font_Hinting",R"#(Enumeration defining font hinting options.)#")
        .value("Font_Hinting_Off",Font_Hinting::Font_Hinting_Off)
        .value("Font_Hinting_Normal",Font_Hinting::Font_Hinting_Normal)
        .value("Font_Hinting_Light",Font_Hinting::Font_Hinting_Light)
        .value("Font_Hinting_ForceAutohint",Font_Hinting::Font_Hinting_ForceAutohint)
        .value("Font_Hinting_NoAutohint",Font_Hinting::Font_Hinting_NoAutohint).export_values();
    py::enum_<Font_UnicodeSubset>(m, "Font_UnicodeSubset",R"#(Enumeration defining Unicode subsets.)#")
        .value("Font_UnicodeSubset_Western",Font_UnicodeSubset::Font_UnicodeSubset_Western)
        .value("Font_UnicodeSubset_Korean",Font_UnicodeSubset::Font_UnicodeSubset_Korean)
        .value("Font_UnicodeSubset_CJK",Font_UnicodeSubset::Font_UnicodeSubset_CJK)
        .value("Font_UnicodeSubset_Arabic",Font_UnicodeSubset::Font_UnicodeSubset_Arabic).export_values();
    m.attr("Font_UnicodeSubset_NB") = py::cast(int(Font_UnicodeSubset_NB));

//Python trampoline classes

// pre-register typdefs+classes (topologically sorted)
    py::class_<Font_FTFontParams , shared_ptr<Font_FTFontParams>  >(m,"Font_FTFontParams",R"#(Font initialization parameters.)#");
    py::class_<Font_Rect , shared_ptr<Font_Rect>  >(m,"Font_Rect",R"#(Auxiliary POD structure - 2D rectangle definition.)#");
    py::class_<Font_FTFont ,opencascade::handle<Font_FTFont>  , Standard_Transient >(m,"Font_FTFont",R"#(Wrapper over FreeType font. Notice that this class uses internal buffers for loaded glyphs and it is absolutely UNSAFE to load/read glyph from concurrent threads!Wrapper over FreeType font. Notice that this class uses internal buffers for loaded glyphs and it is absolutely UNSAFE to load/read glyph from concurrent threads!)#");
    py::class_<Font_FTLibrary ,opencascade::handle<Font_FTLibrary>  , Standard_Transient >(m,"Font_FTLibrary",R"#(Wrapper over FT_Library. Provides access to FreeType library.Wrapper over FT_Library. Provides access to FreeType library.)#");
    py::class_<Font_FontMgr ,opencascade::handle<Font_FontMgr>  , Standard_Transient >(m,"Font_FontMgr",R"#(Collects and provides information about available fonts in system.Collects and provides information about available fonts in system.)#");
    preregister_template_NCollection_List<opencascade::handle<Font_SystemFont>>(m,"Font_NListOfSystemFont");
    py::class_<Font_SystemFont ,opencascade::handle<Font_SystemFont>  , Standard_Transient >(m,"Font_SystemFont",R"#(This class stores information about the font, which is merely a file path and cached metadata about the font.This class stores information about the font, which is merely a file path and cached metadata about the font.)#");
    py::class_<Font_TextFormatter ,opencascade::handle<Font_TextFormatter>  , Standard_Transient >(m,"Font_TextFormatter",R"#(This class is intended to prepare formatted text by using: - font to string combination, - alignment, - wrapping.This class is intended to prepare formatted text by using: - font to string combination, - alignment, - wrapping.)#");

};

// user-defined post-inclusion per module

// user-defined post