#include <string>
#include <sstream>
+#include <map>
namespace caspar {
return system_product_name;
}
+static std::map<std::wstring, std::wstring> enumerate_fonts()
+{
+ std::map<std::wstring, std::wstring> result;
+ const DWORD max_str_length = 32766;
+
+ HKEY hkey;
+ if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"), 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)
+ {
+ int index = 0;
+ do
+ {
+ DWORD name_length = max_str_length;
+ wchar_t name[max_str_length];
+
+ DWORD value_length = max_str_length;
+ wchar_t value[max_str_length];
+
+ long code = RegEnumValueW(hkey, index, name, &name_length, NULL, NULL, (PBYTE)value, &value_length);
+ if(code == ERROR_SUCCESS)
+ {
+ std::wstring name_str(name);
+ name_str = name_str.substr(0, name_str.find_last_of(L' ')); //the font names are formated like this: "AGaramondPro-Italic (OpenType)". We need to strip away the '(OpenType)'-part
+ result.insert(std::pair<std::wstring, std::wstring>(name_str, std::wstring(value)));
+ }
+ else if(code == ERROR_NO_MORE_ITEMS)
+ break;
+ }
+ while(++index);
+ //if(RegQueryValueEx(hkey, TEXT("SystemProductName"), NULL, &dwType, (PBYTE)&p_name_str, &dwSize) == ERROR_SUCCESS)
+ // system_product_name = p_name_str;
+
+ RegCloseKey(hkey);
+ }
+
+ return result;
+}
}
\ No newline at end of file
#include <core/frame/geometry.h>
#include <core/frame/frame.h>
#include <core/frame/draw_frame.h>
+
#include <core/frame/frame_factory.h>
#include <core/frame/pixel_format.h>
#include <core/monitor/monitor.h>