[vlc-commits] [Git][videolan/vlc][master] 5 commits: meson: text_renderer: use new 'enabled' attribute
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Aug 31 12:07:27 UTC 2024
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
30fc276b by Marvin Scholz at 2024-08-31T10:04:13+00:00
meson: text_renderer: use new 'enabled' attribute
- - - - -
b7f90fb1 by Marvin Scholz at 2024-08-31T10:04:13+00:00
meson: text_renderer: add fontconfig support
- - - - -
e4c9b6c2 by Marvin Scholz at 2024-08-31T10:04:13+00:00
modules: freetype: mark argument as unsued
- - - - -
fae9800b by Marvin Scholz at 2024-08-31T10:04:13+00:00
meson: text_renderer: add fribidi support
- - - - -
e10ccd76 by Marvin Scholz at 2024-08-31T10:04:13+00:00
meson: text_renderer: add harfbuzz support
- - - - -
3 changed files:
- meson_options.txt
- modules/text_renderer/freetype/text_layout.c
- modules/text_renderer/meson.build
Changes:
=====================================
meson_options.txt
=====================================
@@ -630,6 +630,21 @@ option('libgcrypt',
value: 'auto',
description: 'libgcrypt support')
+option('fontconfig',
+ type: 'feature',
+ value: 'auto',
+ description: 'fontconfig support')
+
+option('fribidi',
+ type: 'feature',
+ value: 'auto',
+ description: 'Fribidi support')
+
+option('harfbuzz',
+ type: 'feature',
+ value: 'auto',
+ description: 'Harfbuzz support')
+
# TODO: Missing live555
# TODO: Missing v4l2
# TODO: Missing nvdec
@@ -646,9 +661,6 @@ option('libgcrypt',
# TODO: Missing tremor
# TODO: Missing x26410b
# TODO: Missing vdpau
-# TODO: Missing fribidi
-# TODO: Missing harfbuzz
-# TODO: Missing fontconfig
# TODO: Missing directx
# TODO: Missing kva
# TODO: Missing mmal
=====================================
modules/text_renderer/freetype/text_layout.c
=====================================
@@ -318,6 +318,7 @@ static paragraph_t *NewParagraph( filter_t *p_filter,
ruby_block_t **pp_ruby,
int i_runs_size )
{
+ VLC_UNUSED(p_filter);
paragraph_t *p_paragraph = calloc( 1, sizeof( paragraph_t ) );
if( !p_paragraph )
return 0;
=====================================
modules/text_renderer/meson.build
=====================================
@@ -17,6 +17,7 @@ freetype_srcs = files(
'freetype/lru.c',
)
freetype_cppargs = []
+freetype_cargs = []
if host_system == 'windows'
freetype_srcs += files('freetype/fonts/dwrite.cpp')
freetype_cppargs += libcom_cppflags
@@ -30,33 +31,56 @@ endif
# TODO: Anroid-specific sources
# TODO: Fribidi support
# TODO: Harfbuzz support
-if freetype_dep.found()
- vlc_modules += {
- 'name' : 'freetype',
- 'sources' : freetype_srcs,
- 'dependencies' : freetype_deps,
- 'cpp_args' : freetype_cppargs
- }
+
+fontconfig_dep = dependency('fontconfig', version: '>= 2.11',
+ required: get_option('fontconfig').disable_auto_if(host_system in ['darwin', 'windows']))
+
+if fontconfig_dep.found()
+ freetype_srcs += files('freetype/fonts/fontconfig.c')
+ freetype_cargs += '-DHAVE_FONTCONFIG'
+ freetype_deps += fontconfig_dep
endif
-# SVG plugin
-if rsvg_dep.found()
- vlc_modules += {
- 'name' : 'svg',
- 'sources' : files('svg.c'),
- 'dependencies' : [rsvg_dep]
- }
+fribidi_dep = dependency('fribidi', required: get_option('fribidi'))
+
+if fribidi_dep.found()
+ freetype_cargs += '-DHAVE_FRIBIDI'
+ freetype_deps += fribidi_dep
endif
-# macOS text to speech
-if have_osx
- vlc_modules += {
- 'name' : 'nsspeechsynthesizer',
- 'sources' : files('nsspeechsynthesizer.m'),
- 'dependencies' : [cocoa_dep]
- }
+harfbuzz_dep = dependency('harfbuzz', required: get_option('harfbuzz'))
+
+if harfbuzz_dep.found()
+ freetype_cargs += '-DHAVE_HARFBUZZ'
+ freetype_deps += harfbuzz_dep
endif
+vlc_modules += {
+ 'name' : 'freetype',
+ 'sources' : freetype_srcs,
+ 'dependencies' : freetype_deps,
+ 'c_args' : freetype_cargs,
+ 'cpp_args' : freetype_cppargs,
+ 'enabled' : freetype_dep.found(),
+}
+
+# SVG plugin
+vlc_modules += {
+ 'name' : 'svg',
+ 'sources' : files('svg.c'),
+ 'dependencies' : [rsvg_dep],
+ 'enabled' : rsvg_dep.found(),
+}
+
+# macOS text to speech
+vlc_modules += {
+ 'name' : 'nsspeechsynthesizer',
+ 'sources' : files('nsspeechsynthesizer.m'),
+ 'dependencies' : [cocoa_dep],
+ 'enabled' : have_osx,
+}
+
+
# Windows SAPI text to speech
if host_system == 'windows'
have_sapi = cpp.has_type('ISpObjectToken', prefix: '\n'.join([
@@ -64,12 +88,14 @@ if host_system == 'windows'
'#include <sapi.h>',
'#include <sphelper.h>'
]))
-
- if have_sapi
- vlc_modules += {
- 'name' : 'sapi',
- 'sources' : files('sapi.cpp'),
- 'cpp_args' : libcom_cppflags
- }
- endif
+else
+ have_sapi = false
endif
+
+vlc_modules += {
+ 'name' : 'sapi',
+ 'sources' : files('sapi.cpp'),
+ 'cpp_args' : libcom_cppflags,
+ 'enabled' : have_sapi,
+}
+
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e8a944437f24395e404f5f02238506080e46bd2c...e10ccd76fa0c549cefbef474ab994ad3bf9f6057
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e8a944437f24395e404f5f02238506080e46bd2c...e10ccd76fa0c549cefbef474ab994ad3bf9f6057
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list