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
26ed00e3
Commit
26ed00e3
authored
1 week ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
If lowercase char is not mapped to font, lookup the uppercased letter
Not all fonts have the lowercase chars mapped
parent
ba79c367
No related branches found
No related tags found
No related merge requests found
Pipeline
#8883
passed
1 week ago
Stage: build
Stage: test
Stage: cleanup
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/load/tdfonts_lib.js
+9
-1
9 additions, 1 deletion
exec/load/tdfonts_lib.js
with
9 additions
and
1 deletion
exec/load/tdfonts_lib.js
+
9
−
1
View file @
26ed00e3
...
@@ -280,7 +280,7 @@ function readchar(i, font) { // glyph argument is no longer needed, we return th
...
@@ -280,7 +280,7 @@ function readchar(i, font) { // glyph argument is no longer needed, we return th
}
}
function
lookupchar
(
c
,
font
)
{
function
lookupchar
_code
(
c
,
font
)
{
var
char_code
=
c
.
charCodeAt
(
0
);
// Get the ASCII value of the character
var
char_code
=
c
.
charCodeAt
(
0
);
// Get the ASCII value of the character
for
(
var
i
=
0
;
i
<
NUM_CHARS
;
i
++
)
{
for
(
var
i
=
0
;
i
<
NUM_CHARS
;
i
++
)
{
// We need to find the index `i` in `charlist` that corresponds to `c`.
// We need to find the index `i` in `charlist` that corresponds to `c`.
...
@@ -297,6 +297,14 @@ function lookupchar(c, font) {
...
@@ -297,6 +297,14 @@ function lookupchar(c, font) {
return
-
1
;
// Character not found in charlist
return
-
1
;
// Character not found in charlist
}
}
// Lookup the uppercase char if lowercase char not mapped to font
function
lookupchar
(
c
,
font
)
{
var
result
=
lookupchar_code
(
c
,
font
);
if
(
result
==
-
1
)
result
=
lookupchar_code
(
c
.
toUpperCase
(),
font
);
return
result
;
}
// ibmtoutf8 function (using system.text_to_utf8 as a replacement for iconv)
// ibmtoutf8 function (using system.text_to_utf8 as a replacement for iconv)
// This function's logic is now integrated into readchar.
// This function's logic is now integrated into readchar.
...
...
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