00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00033
00034 #pragma once
00035
00036 #include "../api_display.h"
00037 #include "../../Core/System/sharedptr.h"
00038
00039 class CL_FontMetrics_Impl;
00040
00044 class CL_API_DISPLAY CL_FontMetrics
00045 {
00048
00049 public:
00051 CL_FontMetrics();
00052
00053 CL_FontMetrics(
00054 float height,
00055 float ascent=0.0f,
00056 float descent=0.0f,
00057 float internal_leading=0.0f,
00058 float external_leading=0.0f,
00059 float average_character_width=0.0f,
00060 float max_character_width=0.0f,
00061 float weight=0.0f,
00062 float overhang=0.0f,
00063 float digitized_aspect_x=0.0f,
00064 float digitized_aspect_y=0.0f,
00065 bool italic=false,
00066 bool underlined=false,
00067 bool struck_out=false,
00068 bool fixed_pitch=false
00069 );
00070
00071 ~CL_FontMetrics();
00072
00076
00077 public:
00079 float get_height() const;
00080
00082 float get_ascent() const;
00083
00085 float get_descent() const;
00086
00088 float get_internal_leading() const;
00089
00091 float get_external_leading() const;
00092
00094
00096 float get_average_character_width() const;
00097
00099 float get_max_character_width() const;
00100
00102 float get_weight() const;
00103
00105 float get_overhang() const;
00106
00108 float get_digitized_aspect_x() const;
00109
00111 float get_digitized_aspect_y() const;
00112
00114 CL_String::char_type get_first_char() const;
00115
00117 CL_String::char_type get_last_char() const;
00118
00120 CL_String::char_type get_default_char() const;
00121
00123 CL_String::char_type get_word_break_char() const;
00124
00126 bool is_italic() const;
00127
00129 bool is_underlined() const;
00130
00132 bool is_struck_out() const;
00133
00135 bool is_fixed_pitch() const;
00136
00140
00141 public:
00142
00146 void set_height(float value);
00147
00151 void set_ascent(float value);
00152
00156 void set_descent(float value);
00157
00161 void set_internal_leading(float value);
00162
00166 void set_external_leading(float value);
00167
00171 void set_average_character_width(float value);
00172
00176 void set_max_character_width(float value);
00177
00181 void set_weight(float value);
00182
00186 void set_overhang(float value);
00187
00191 void set_digitized_aspect_x(float value);
00192
00196 void set_digitized_aspect_y(float value);
00197
00201 void set_italic(bool value);
00202
00206 void set_underlined(bool value);
00207
00211 void set_struck_out(bool value);
00212
00216 void set_fixed_pitch(bool value);
00217
00218
00222
00223 private:
00224 CL_SharedPtr<CL_FontMetrics_Impl> impl;
00226 };
00227
00229