Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
b6e9913f
Commit
b6e9913f
authored
Mar 20, 2005
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- all: use fribidi in skins2 text rendering if available
parent
cb6024d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
configure.ac
configure.ac
+2
-0
modules/gui/skins2/src/ft2_font.cpp
modules/gui/skins2/src/ft2_font.cpp
+24
-0
No files found.
configure.ac
View file @
b6e9913f
...
...
@@ -2950,7 +2950,9 @@ from http://www.freetype.org/, or configure with --disable-freetype. Have a nice
if test "${FRIBIDI_CONFIG}" != "no"
then
VLC_ADD_CFLAGS([freetype], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
VLC_ADD_CPPFLAGS([skins2], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
VLC_ADD_LDFLAGS([freetype], [`${FRIBIDI_CONFIG} --libs`])
VLC_ADD_LDFLAGS([skins2], [`${FRIBIDI_CONFIG} --libs`])
fi
fi
fi
...
...
modules/gui/skins2/src/ft2_font.cpp
View file @
b6e9913f
...
...
@@ -26,6 +26,10 @@
#include "ft2_bitmap.hpp"
#include "../utils/ustring.hpp"
#ifdef HAVE_FRIBIDI
#include <fribidi/fribidi.h>
#endif
FT2Font
::
FT2Font
(
intf_thread_t
*
pIntf
,
const
string
&
rName
,
int
size
)
:
GenericFont
(
pIntf
),
m_name
(
rName
),
m_buffer
(
NULL
),
m_size
(
size
),
...
...
@@ -160,6 +164,19 @@ GenericBitmap *FT2Font::drawString( const UString &rString, uint32_t color,
// Get the length of the string
int
len
=
rString
.
length
();
// Use fribidi if available
#ifdef HAVE_FRIBIDI
uint32_t
*
pFribidiString
=
NULL
;
if
(
len
>
0
)
{
pFribidiString
=
new
uint32_t
[
len
+
1
];
FriBidiCharType
baseDir
=
FRIBIDI_TYPE_ON
;
fribidi_log2vis
(
(
FriBidiChar
*
)
pString
,
len
,
&
baseDir
,
(
FriBidiChar
*
)
pFribidiString
,
0
,
0
,
0
);
pString
=
pFribidiString
;
}
#endif
// Array of glyph bitmaps and position
FT_Glyph
*
glyphs
=
new
FT_Glyph
[
len
];
int
*
pos
=
new
int
[
len
];
...
...
@@ -241,6 +258,13 @@ GenericBitmap *FT2Font::drawString( const UString &rString, uint32_t color,
}
}
#ifdef HAVE_FRIBIDI
if
(
len
>
0
)
{
delete
[]
pFribidiString
;
}
#endif
// Adjust the size for vertical padding
yMax
=
__MAX
(
yMax
,
m_ascender
);
yMin
=
__MIN
(
yMin
,
m_descender
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment