Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
2d7a0207
Commit
2d7a0207
authored
Nov 11, 2015
by
Salah-Eddin Shaban
Committed by
Jean-Baptiste Kempf
Nov 12, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Freetype: handle special space characters
Close #15840 Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
0eaa306d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
3 deletions
+36
-3
modules/text_renderer/text_layout.c
modules/text_renderer/text_layout.c
+36
-3
No files found.
modules/text_renderer/text_layout.c
View file @
2d7a0207
...
@@ -516,14 +516,25 @@ static int AddRunWithFallback( filter_t *p_filter, paragraph_t *p_paragraph,
...
@@ -516,14 +516,25 @@ static int AddRunWithFallback( filter_t *p_filter, paragraph_t *p_paragraph,
/*
/*
* Move p_face to the beginning of the array. Otherwise strikethrough
* Move p_face to the beginning of the array. Otherwise strikethrough
* lines can appear segmented, being rendered at a certain height
* lines can appear segmented, being rendered at a certain height
* through spaces and at a different height through words
* through spaces and at a different height through words.
* Skip this step for the specified special characters. See #15840.
*/
*/
if
(
i_index
>
0
)
if
(
i_index
>
0
)
{
uni_char_t
codepoint
=
p_paragraph
->
p_code_points
[
i
];
if
(
codepoint
!=
0x0009
&&
codepoint
!=
0x00A0
&&
codepoint
!=
0x1680
&&
codepoint
!=
0x061C
&&
codepoint
!=
0x202F
&&
codepoint
!=
0x205F
&&
codepoint
!=
0x3000
&&
codepoint
!=
0xFEFF
&&
!
(
codepoint
>=
0x2000
&&
codepoint
<=
0x200F
)
&&
!
(
codepoint
>=
0x202A
&&
codepoint
<=
0x202E
)
&&
!
(
codepoint
>=
0x2060
&&
codepoint
<=
0x2069
)
)
{
{
pp_faces
[
i_index
]
=
pp_faces
[
0
];
pp_faces
[
i_index
]
=
pp_faces
[
0
];
pp_faces
[
0
]
=
p_face
;
pp_faces
[
0
]
=
p_face
;
}
}
}
}
}
}
while
(
i_glyph_index
==
0
&&
++
i_index
<
MAX_FACES
);
}
while
(
i_glyph_index
==
0
&&
++
i_index
<
MAX_FACES
);
}
}
...
@@ -958,6 +969,28 @@ static int LoadGlyphs( filter_t *p_filter, paragraph_t *p_paragraph,
...
@@ -958,6 +969,28 @@ static int LoadGlyphs( filter_t *p_filter, paragraph_t *p_paragraph,
i_glyph_index
=
i_glyph_index
=
FT_Get_Char_Index
(
p_face
,
p_paragraph
->
p_code_points
[
j
]
);
FT_Get_Char_Index
(
p_face
,
p_paragraph
->
p_code_points
[
j
]
);
/*
* If the font has no support for special space characters, use regular
* space glyphs instead of the .notdef glyph.
*/
if
(
!
i_glyph_index
)
{
uni_char_t
codepoint
=
p_paragraph
->
p_code_points
[
j
];
if
(
codepoint
==
0x0009
||
codepoint
==
0x00A0
||
codepoint
==
0x1680
||
codepoint
==
0x3000
||
codepoint
==
0x202F
||
codepoint
==
0x205F
||
(
codepoint
>=
0x2000
&&
codepoint
<=
0x200A
)
#ifdef HAVE_FRIBIDI
||
p_paragraph
->
p_types
[
j
]
==
FRIBIDI_TYPE_WS
||
p_paragraph
->
p_types
[
j
]
==
FRIBIDI_TYPE_CS
||
p_paragraph
->
p_types
[
j
]
==
FRIBIDI_TYPE_SS
#endif
)
{
i_glyph_index
=
3
;
}
}
glyph_bitmaps_t
*
p_bitmaps
=
p_paragraph
->
p_glyph_bitmaps
+
j
;
glyph_bitmaps_t
*
p_bitmaps
=
p_paragraph
->
p_glyph_bitmaps
+
j
;
if
(
FT_Load_Glyph
(
p_face
,
i_glyph_index
,
if
(
FT_Load_Glyph
(
p_face
,
i_glyph_index
,
...
...
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