VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtFontInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtBoundingBox.h>
14 
15 namespace makVrv
16 {
17  class DtPen;
18  class DtUnicode;
19 
23  {
24  public:
25 
27  {
31  AlignJustify
32  };
33 
35  DtFontInterface() = default;
36 
38  ~DtFontInterface();
39 
40  // Gets the line spacing for the font.
41  virtual float lineHeight() const = 0;
42 
44  virtual DtBoundingBox calculateBoundingBox(const DtPen& pen,
45  const DtUnicode& string, unsigned int pos = 0, int len = -1) = 0;
46 
48  virtual Dt2dPoint calculateGlyphSize(const DtPen& pen,
49  const DtUnicode& string, unsigned int pos = 0, int len = -1) = 0;
50 
52  virtual bool isValid() const = 0;
53 
54  };
55 }
Definition: DtFontInterface.h:30
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
Contains the makVrv::DtBoundingBox class declaration.
TextAlignment
Definition: DtFontInterface.h:26
A 2D point.
Definition: DtBoundingBox.h:19
Definition: DtFontInterface.h:28
A class with encapsulated a font loaded from disk with a given size.
Definition: DtFontInterface.h:22
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
A pen object with parameters on how to draw text.
Definition: DtBoundingBox.h:80
Definition: DtFontInterface.h:29
A simple bounding box.
Definition: DtBoundingBox.h:101
Contains DLL export macros.

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)