New upstream version 18.0.1+dfsg1
This commit is contained in:
parent
6efda2859e
commit
f2cf6cce50
1337 changed files with 41178 additions and 84670 deletions
14
plugins/text-freetype2/data/locale/et-EE.ini
Normal file
14
plugins/text-freetype2/data/locale/et-EE.ini
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
TextFreetype2="Tekst (FreeType 2)"
|
||||
Font="Font"
|
||||
Text="Tekst"
|
||||
TextFile="Tekstifail (UTF-8 või UTF-16)"
|
||||
TextFileFilter="Tekstifailid (*.txt);;"
|
||||
ChatLogMode="Vestlus logi režiim (Viimased 6 rida)"
|
||||
Color1="Värv 1"
|
||||
Color2="Värv 2"
|
||||
Outline="Kontuur"
|
||||
DropShadow="Langev vari"
|
||||
ReadFromFile="Loe failist"
|
||||
CustomWidth="Kohandatud teksti laius"
|
||||
WordWrap="Eraldi reale"
|
||||
|
||||
9
plugins/text-freetype2/data/locale/ms-MY.ini
Normal file
9
plugins/text-freetype2/data/locale/ms-MY.ini
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
TextFreetype2="Teks (FreeType 2)"
|
||||
Font="Jenis Tulisan"
|
||||
Text="Teks"
|
||||
TextFile="Fail teks (UTF-8 atau UTF-16)"
|
||||
TextFileFilter="Fail teks (*.txt);;"
|
||||
ChatLogMode="Mod log chat (6 baris terakhir)"
|
||||
Color1="Warna 1"
|
||||
Color2="Warna 2"
|
||||
|
||||
|
|
@ -50,6 +50,26 @@ static struct obs_source_info freetype2_source_info = {
|
|||
.get_properties = ft2_source_properties,
|
||||
};
|
||||
|
||||
static bool plugin_initialized = false;
|
||||
|
||||
static void init_plugin(void)
|
||||
{
|
||||
if (plugin_initialized)
|
||||
return;
|
||||
|
||||
FT_Init_FreeType(&ft2_lib);
|
||||
|
||||
if (ft2_lib == NULL) {
|
||||
blog(LOG_WARNING, "FT2-text: Failed to initialize FT2.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!load_cached_os_font_list())
|
||||
load_os_font_list();
|
||||
|
||||
plugin_initialized = true;
|
||||
}
|
||||
|
||||
bool obs_module_load()
|
||||
{
|
||||
char *config_dir = obs_module_config_path(NULL);
|
||||
|
|
@ -58,16 +78,6 @@ bool obs_module_load()
|
|||
bfree(config_dir);
|
||||
}
|
||||
|
||||
FT_Init_FreeType(&ft2_lib);
|
||||
|
||||
if (ft2_lib == NULL) {
|
||||
blog(LOG_WARNING, "FT2-text: Failed to initialize FT2.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!load_cached_os_font_list())
|
||||
load_os_font_list();
|
||||
|
||||
obs_register_source(&freetype2_source_info);
|
||||
|
||||
return true;
|
||||
|
|
@ -75,8 +85,10 @@ bool obs_module_load()
|
|||
|
||||
void obs_module_unload(void)
|
||||
{
|
||||
free_os_font_list();
|
||||
FT_Done_FreeType(ft2_lib);
|
||||
if (plugin_initialized) {
|
||||
free_os_font_list();
|
||||
FT_Done_FreeType(ft2_lib);
|
||||
}
|
||||
}
|
||||
|
||||
static const char *ft2_source_get_name(void *unused)
|
||||
|
|
@ -442,6 +454,8 @@ static void *ft2_source_create(obs_data_t *settings, obs_source_t *source)
|
|||
obs_data_t *font_obj = obs_data_create();
|
||||
srcdata->src = source;
|
||||
|
||||
init_plugin();
|
||||
|
||||
srcdata->font_size = 32;
|
||||
|
||||
obs_data_set_default_string(font_obj, "face", DEFAULT_FACE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue