FastUIDraw
glyph_metrics_value.hpp
1 /*!
2  * \file glyph_metrics.hpp
3  * \brief file glyph_metrics.hpp
4  *
5  * Copyright 2016 by Intel.
6  *
7  * Contact: kevin.rogovin@gmail.com
8  *
9  * This Source Code Form is subject to the
10  * terms of the Mozilla Public License, v. 2.0.
11  * If a copy of the MPL was not distributed with
12  * this file, You can obtain one at
13  * http://mozilla.org/MPL/2.0/.
14  *
15  * \author Kevin Rogovin <kevin.rogovin@gmail.com>
16  *
17  */
18 
19 
20 #ifndef FASTUIDRAW_GLYPH_METRICS_VALUE_HPP
21 #define FASTUIDRAW_GLYPH_METRICS_VALUE_HPP
22 
23 #include <stdint.h>
24 
25 #include <fastuidraw/util/util.hpp>
26 #include <fastuidraw/util/vecN.hpp>
29 
30 namespace fastuidraw
31 {
32 /*!\addtogroup Glyph
33  * @{
34  */
35  class FontBase;
36  class GlyphCache;
37  class Glyph;
38 
39  /*!
40  * \brief
41  * A GlyphMetricsValue is to be used by a \ref FontBase
42  * derived object to specify the values of a \ref
43  * GlyphMetrics object.
44  */
46  {
47  public:
48  /*!
49  * Set the value returned by GlyphMetrics::horizontal_layout_offset().
50  * Default value is (0, 0).
51  */
54 
55  /*!
56  * Set the value returned by GlyphMetrics::vertical_layout_offset().
57  * Default value is (0, 0).
58  */
61 
62  /*!
63  * Set the value returned by GlyphMetrics::size().
64  * Default value is (0, 0).
65  */
67  size(vec2);
68 
69  /*!
70  * Set the value returned by GlyphMetrics::advance().
71  * Default value is (0, 0).
72  */
74  advance(vec2);
75 
76  /*!
77  * Set the value returned by GlyphMetrics::units_per_EM().
78  * Default value is 0.
79  */
81  units_per_EM(float);
82 
83  private:
84  friend class GlyphCache;
85  friend class Glyph;
86 
87  GlyphMetricsValue(void *d):
88  m_d(d)
89  {}
90 
91  void *m_d;
92  };
93 /*! @} */
94 }
95 
96 #endif
GlyphMetricsValue & size(vec2)
all classes and functions of FastUIDraw are in the namespace fastuidraw.
Definition: colorstop.hpp:28
A GlyphCache represents a cache of glyphs and manages the uploading of the data to a GlyphAtlas...
Definition: glyph_cache.hpp:43
A GlyphMetricsValue is to be used by a FontBase derived object to specify the values of a GlyphMetric...
file c_array.hpp
GlyphMetricsValue & advance(vec2)
file util.hpp
GlyphMetricsValue & vertical_layout_offset(vec2)
file vecN.hpp
GlyphMetricsValue & units_per_EM(float)
A Glyph is essentially an opaque pointer to data for rendering and performing layout of a glyph...
Definition: glyph.hpp:48
GlyphMetricsValue & horizontal_layout_offset(vec2)
file reference_counted.hpp