Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
78726fda
Commit
78726fda
authored
Mar 27, 2004
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* bitmap_font.cpp: full support of text bitmap font
parent
d5c4e1bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
modules/gui/skins2/src/bitmap_font.cpp
modules/gui/skins2/src/bitmap_font.cpp
+24
-2
No files found.
modules/gui/skins2/src/bitmap_font.cpp
View file @
78726fda
...
...
@@ -30,6 +30,7 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
const
string
&
rType
)
:
GenericFont
(
pIntf
),
m_rBitmap
(
rBitmap
)
{
// Build the character table
if
(
rType
==
"digits"
)
{
m_width
=
9
;
...
...
@@ -50,14 +51,35 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
m_skip
=
5
;
for
(
int
i
=
0
;
i
<
26
;
i
++
)
{
m_table
[
'A'
+
i
].
m_xPos
=
i
*
m_width
;
m_table
[
'a'
+
i
].
m_xPos
=
i
*
m_width
;
m_table
[
'A'
+
i
].
m_xPos
=
m_table
[
'a'
+
i
].
m_xPos
=
i
*
m_width
;
}
m_table
[(
size_t
)
'"'
].
m_xPos
=
26
*
m_width
;
m_table
[(
size_t
)
'@'
].
m_xPos
=
27
*
m_width
;
m_table
[(
size_t
)
' '
].
m_xPos
=
28
*
m_width
;
for
(
int
i
=
0
;
i
<=
9
;
i
++
)
{
m_table
[
'0'
+
i
].
m_xPos
=
i
*
m_width
;
m_table
[
'0'
+
i
].
m_yPos
=
m_height
;
}
static
const
char
specialChars
[]
=
{
'.'
,
':'
,
'('
,
')'
,
'-'
,
'\''
,
'!'
,
'_'
,
'+'
,
'\\'
,
'/'
,
'['
,
']'
,
'^'
,
'&'
,
'%'
,
','
,
'='
,
'$'
,
'#'
};
for
(
int
i
=
0
;
i
<
19
;
i
++
)
{
m_table
[(
size_t
)
specialChars
[
i
]].
m_xPos
=
(
11
+
i
)
*
m_width
;
m_table
[(
size_t
)
specialChars
[
i
]].
m_yPos
=
m_height
;
}
m_table
[(
size_t
)
''
].
m_xPos
=
m_table
[(
size_t
)
''
].
m_xPos
=
0
;
m_table
[(
size_t
)
''
].
m_xPos
=
m_table
[(
size_t
)
''
].
m_xPos
=
m_width
;
m_table
[(
size_t
)
''
].
m_xPos
=
m_table
[(
size_t
)
''
].
m_xPos
=
3
*
m_width
;
m_table
[(
size_t
)
'?'
].
m_xPos
=
4
*
m_width
;
m_table
[(
size_t
)
'*'
].
m_xPos
=
5
*
m_width
;
static
const
char
thirdLine
[]
=
{
''
,
''
,
''
,
''
,
''
,
''
,
'?'
,
'*'
};
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
m_table
[(
size_t
)
thirdLine
[
i
]].
m_yPos
=
2
*
m_height
;
}
}
}
...
...
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