Use One-Time Initialization for glyph run caching to avoid duplicate glyph run genera...
[gdipp.git] / gdipp_lib / helper.h
blob2c7d614017a384a170936932988b5f2e471b77d8
1 #pragma once
3 #include "gdipp_lib/api.h"
5 namespace gdipp
8 // convert a string to template value if possible
9 // helper function to convert raw config strings to values
10 template<typename T>
11 void wcs_convert(const wchar_t *str, T *converted)
13 if (str != NULL)
14 std::wistringstream(str) >> *converted;
17 struct GDIPP_API wstring_ci_less
19 bool operator()(const std::wstring &string1, const std::wstring &string2) const;
22 GDIPP_API BOOL get_dir_file_path(HMODULE h_module, const wchar_t *file_name, wchar_t *out_path);
24 GDIPP_API void init_minidump();
25 GDIPP_API void register_minidump_module(HMODULE h_module);
27 GDIPP_API char get_gdi_weight_class(unsigned short weight);
29 // generate hash of traits for the specified font configuration
30 // returned integer is used as key of configuration map
31 GDIPP_API unsigned long get_render_config_trait(char weight_class, bool italic, LONG height, const wchar_t *font_name);