MeshLib C++ Docs
Loading...
Searching...
No Matches
MRSymbolMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRSymbolMeshFwd.h"
4
5#include "MRMesh/MRVector2.h"
6#include "MRMesh/MRSystem.h"
7#include "MRMesh/MRExpected.h"
8
9#include <string>
10#include <filesystem>
11
12namespace MR
13{
16
17
23
25{
27 std::string text;
33 Vector2f symbolsDistanceAdditionalOffset{ 0.0f, 0.0f };
39#ifdef _WIN32
41 std::filesystem::path pathToFontFile = GetWindowsInstallDirectory() / "Fonts" / "Consola.ttf";
42#else
44 std::filesystem::path pathToFontFile;
45#endif
46
48 static constexpr float MaxGeneratedFontHeight = 5826.0f * 1e-3f;
49};
50
53
55MRSYMBOLMESH_API Expected<Mesh> createSymbolsMesh( const SymbolMeshParams& params );
56
57}
static constexpr float MaxGeneratedFontHeight
_WIN32
Definition MRSymbolMesh.h:48
Vector2f symbolsDistanceAdditionalOffset
Definition MRSymbolMesh.h:33
MRSYMBOLMESH_API Expected< Mesh > createSymbolsMesh(const SymbolMeshParams &params)
converts text string into Z-facing symbol mesh
MRSYMBOLMESH_API Expected< Contours2f > createSymbolContours(const SymbolMeshParams &params)
converts text string into set of contours
float symbolsThicknessOffsetModifier
Definition MRSymbolMesh.h:36
tl::expected< T, E > Expected
Definition MRExpected.h:31
AlignType
Definition MRSymbolMesh.h:18
int fontDetalization
Detailization of Bezier curves on font glyphs.
Definition MRSymbolMesh.h:29
std::filesystem::path pathToFontFile
Path to font file.
Definition MRSymbolMesh.h:44
std::string text
Text that will be made mesh.
Definition MRSymbolMesh.h:27
AlignType align
alignment of the text inside bbox
Definition MRSymbolMesh.h:38
@ Right
Definition MRSymbolMesh.h:21
@ Center
Definition MRSymbolMesh.h:20
@ Left
Definition MRSymbolMesh.h:19
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRSymbolMesh.h:25