Rpi-hw  0.7.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
freetype-inl.hpp
1 /*
2  Title --- font/freetype-inl.hpp
3 
4  Copyright (C) 2013 Giacomo Trudu - wicker25[at]gmail[dot]com
5 
6  This file is part of Rpi-hw.
7 
8  Rpi-hw is free software: you can redistribute it and/or modify
9  it under the terms of the GNU Lesser General Public License as published by
10  the Free Software Foundation version 3 of the License.
11 
12  Rpi-hw is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with Rpi-hw. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #include <rpi-hw/config.hpp>
23 
24 #if USE_FREETYPE
25 
26 #ifndef _RPI_HW_FONT_FREETYPE_INL_HPP_
27 #define _RPI_HW_FONT_FREETYPE_INL_HPP_
28 
29 namespace rpihw { // Begin main namespace
30 
31 namespace font { // Begin fonts namespace
32 
33 inline const std::string &
35 
36  // Return the path to the font
37  return m_path;
38 }
39 
40 inline void
41 freetype::setSize( uint8_t height ) {
42 
43  // Set the font size
44  m_image_type->width = height;
45  m_image_type->height = height;
46 }
47 
48 inline uint8_t
50 
51  // Return the height of the font
52  return m_image_type->height;
53 }
54 
55 } // End of fonts namespace
56 
57 } // End of main namespace
58 
59 #endif /* _RPI_HW_FONT_FREETYPE_INL_HPP_ */
60 
61 #endif /* USE_FREETYPE */
virtual uint8_t getHeight() const
Returns the height of the font.
FTC_ImageType m_image_type
Type of images in the glyph cache.
Definition: freetype.hpp:133
virtual const std::string & getPath() const
Returns the path to the font.
std::string m_path
Path to the font.
Definition: freetype.hpp:124
virtual void setSize(uint8_t height)
Sets the font size.