Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
4adaee0b
Commit
4adaee0b
authored
19 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Support Font Selection from ANSI standard.
parent
b1fbb25d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/conio/cterm.c
+25
-8
25 additions, 8 deletions
src/conio/cterm.c
src/conio/cterm.txt
+42
-0
42 additions, 0 deletions
src/conio/cterm.txt
with
67 additions
and
8 deletions
src/conio/cterm.c
+
25
−
8
View file @
4adaee0b
...
...
@@ -527,7 +527,23 @@ void do_ansi(char *retbuf, size_t retsize, int *speed)
i
=
cterm
.
width
;
gotoxy
(
i
,
wherey
());
break
;
case
'D'
:
/* Cursor Left */
case
'D'
:
/* Cursor Left and Font Select */
if
(
*
(
p
-
1
)
==
' '
)
{
/* Font Select */
i
=
0
;
j
=
0
;
if
(
strlen
(
cterm
.
escbuf
)
>
2
)
{
if
((
p
=
strtok
(
cterm
.
escbuf
+
1
,
";"
))
!=
NULL
)
{
i
=
atoi
(
p
);
if
((
p
=
strtok
(
NULL
,
";"
))
!=
NULL
)
{
j
=
atoi
(
p
);
}
}
if
(
i
==
0
)
{
/* Only the primary font is currently supported */
setfont
(
j
,
FALSE
);
}
}
}
else
{
i
=
atoi
(
cterm
.
escbuf
+
1
);
if
(
i
==
0
)
i
=
1
;
...
...
@@ -535,6 +551,7 @@ void do_ansi(char *retbuf, size_t retsize, int *speed)
if
(
i
<
1
)
i
=
1
;
gotoxy
(
i
,
wherey
());
}
break
;
case
'E'
:
i
=
atoi
(
cterm
.
escbuf
+
1
);
...
...
This diff is collapsed.
Click to expand it.
src/conio/cterm.txt
+
42
−
0
View file @
4adaee0b
...
...
@@ -160,6 +160,48 @@ CSI [ p1 ] D
SOURCE: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
CSI [ p1 [ ; p2 ] ] sp D
Font Selection
Defaults: p1 = 0 p2 = 0
Sets font p1 to be the one indicated bu p2. Currently only the primary font
(Font zero) is supported. p2 must be between 0 and 255. Not all output types
support font selection. Only X11 and SDL currently do.
Currently included fonts are:
0 - Codepage 437 English
1 - Codepage 1251 Cyrillic, (swiss)
2 - Russian koi8-r
3 - ISO-8859-2 Central European
4 - ISO-8859-4 Baltic wide (VGA 9bit mapped)
5 - Codepage 866 (c) Russian
6 - ISO-8859-9 Turkish
7 - haik8 codepage (use only with armscii8 screenmap)
8 - ISO-8859-8 Hebrew
9 - Ukrainian font koi8-u
10 - ISO-8859-15 West European, (thin)
11 - ISO-8859-4 Baltic (VGA 9bit mapped)
12 - Russian koi8-r (b)
13 - ISO-8859-4 Baltic wide
14 - ISO-8859-5 Cyrillic
15 - ARMSCII-8 Character set
16 - ISO-8859-15 West European
17 - Codepage 850 Multilingual Latin I, (thin)
18 - Codepage 850 Multilingual Latin I
19 - Codepage 885 Norwegian, (thin)
20 - Codepage 1251 Cyrillic
21 - ISO-8859-7 Greek
22 - Russian koi8-r (c)
23 - ISO-8859-4 Baltic
24 - ISO-8859-1 West European
25 - Codepage 866 Russian
26 - Codepage 437 English, (thin)
27 - Codepage 866 (b) Russian
28 - Codepage 885 Norwegian
29 - Ukrainian font cp866u
30 - ISO-8859-1 West European, (thin)
31 - Codepage 1131 Belarusian, (swiss)
Not all fonts are supported in all modes. If a font is not supported in the
current mode, no action is taken.
CSI [ p1 ] E
Cursor Next Line
Defaults: p1 = 1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment