libart-paperback 0.1.0-a.1.20260122225059.e5fea306241a
PDF (1.4) library for C++
standard-font.hxx
1#ifndef art__paperback__graphics__standard_font_hxx_
2#define art__paperback__graphics__standard_font_hxx_
3
4#include <art/paperback/types.hxx>
5#include <art/paperback/forward.hxx>
6
7#include <art/paperback/graphics/font.hxx>
8
10{
11
12 /// Represents a standard PDF font.
13 ///
15 : public Font
16 {
17 public:
18 /// Constructor.
19 ///
20 Standard_font(Document&, string const&);
21
22 /// Destructor.
23 ///
24 ~Standard_font() noexcept override;
25
27 document() override;
28
30 object() override;
31
32 string
33 name() const override;
34
35 int16_t
36 get_ascent() const override;
37
38 int16_t
39 get_descent() const override;
40
41 uint16_t
42 get_xheight() const override;
43
44 uint16_t
45 get_capheight() const override;
46
48 get_text_width(string const&) override;
49
50 private:
51 Standard_font(Standard_font const&) = delete;
52 Standard_font(Standard_font&&) = delete;
53 Standard_font& operator=(Standard_font const&) = delete;
54 Standard_font& operator=(Standard_font&&) = delete;
55
56 private:
57 struct Internal;
58 unique_ptr<Internal> internal;
59
60 };
61
62} // namespace Art::Paperback::Graphics
63
64#endif
Represents a COS-file object.
Definition object.hxx:16
Definition document.hxx:12
Font()
Constructor.
Definition font.hxx:94
int16_t get_descent() const override
Definition standard-font.cxx:102
Text_width get_text_width(string const &) override
text is assumed to be encoded in UTF-8 and will be decoded as such during text width computation.
Definition standard-font.cxx:132
Carousel::Object object() override
Get the COS object for this font.
Definition standard-font.cxx:77
int16_t get_ascent() const override
Definition standard-font.cxx:93
uint16_t get_xheight() const override
Definition standard-font.cxx:111
uint16_t get_capheight() const override
Definition standard-font.cxx:120
~Standard_font() noexcept override
Destructor.
Definition standard-font.cxx:65
Standard_font(Document &, string const &)
Constructor.
Definition standard-font.cxx:45
Document & document() override
Access the parent document of this font.
Definition standard-font.cxx:70
string name() const override
Get the name of the font.
Definition standard-font.cxx:84
Graphics namespace.
Definition forward.hxx:105
Represents text width computations.
Definition font.hxx:13