Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
luatex
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
TeXLive
luatex
Commits
6ccc24ee
Commit
6ccc24ee
authored
6 years ago
by
Luigi Scarso
Browse files
Options
Downloads
Patches
Plain Diff
possible patch for tounicode (but needs testing in context) (HH)
parent
4e082a46
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/texk/web2c/luatexdir/font/tounicode.c
+35
-3
35 additions, 3 deletions
source/texk/web2c/luatexdir/font/tounicode.c
source/texk/web2c/luatexdir/luatex_svnversion.h
+1
-1
1 addition, 1 deletion
source/texk/web2c/luatexdir/luatex_svnversion.h
with
36 additions
and
4 deletions
source/texk/web2c/luatexdir/font/tounicode.c
+
35
−
3
View file @
6ccc24ee
...
...
@@ -287,6 +287,7 @@ static void set_glyph_unicode(char *s, glyph_unicode_entry * gp)
}
}
/*
static void set_cid_glyph_unicode(long index, glyph_unicode_entry * gp, internal_font_number f)
{
char *s;
...
...
@@ -295,13 +296,14 @@ static void set_cid_glyph_unicode(long index, glyph_unicode_entry * gp, internal
gp->code = UNI_EXTRA_STRING;
gp->unicode_seq = xstrdup(s);
} else {
/
*tex
No fall back as we're providing them ourselves.
*/
/
/
No fall back as we're providing them ourselves.
}
} else {
/
*tex
Fall back
. */
/
/
Fall back
gp->code = index;
}
}
*/
int
write_tounicode
(
PDF
pdf
,
char
**
glyph_names
,
char
*
name
)
{
...
...
@@ -470,9 +472,10 @@ int write_cid_tounicode(PDF pdf, fo_entry * fo, internal_font_number f)
static
int
range_size
[
65537
];
static
glyph_unicode_entry
gtab
[
65537
];
int
objnum
;
int
i
,
j
,
k
;
int
i
,
j
,
k
,
tu
;
int
bfchar_count
,
bfrange_count
,
subrange_count
;
char
*
buf
;
char
*
s
;
buf
=
xmalloc
((
unsigned
)
(
strlen
(
fo
->
fd
->
fontname
)
+
8
));
sprintf
(
buf
,
"%s-%s"
,
(
fo
->
fd
->
subset_tag
!=
NULL
?
fo
->
fd
->
subset_tag
:
"UCS"
),
fo
->
fd
->
fontname
);
objnum
=
pdf_create_obj
(
pdf
,
obj_type_others
,
0
);
...
...
@@ -514,7 +517,36 @@ int write_cid_tounicode(PDF pdf, fo_entry * fo, internal_font_number f)
if
(
quick_char_exists
(
k
,
i
)
&&
char_used
(
k
,
i
))
{
j
=
char_index
(
k
,
i
);
if
(
gtab
[
j
].
code
==
UNI_UNDEF
)
{
/*
set_cid_glyph_unicode(i, >ab[j], f);
*/
tu
=
0
;
/*tex
First look in the instance (new). Ff this fails
us (context) it will go away or become an option.
*/
if
(
font_tounicode
(
k
))
{
tu
=
1
;
/*tex no fallback to index */
if
((
s
=
get_charinfo_tounicode
(
char_info
(
k
,
(
int
)
i
)))
!=
NULL
)
{
gtab
[
j
].
code
=
UNI_EXTRA_STRING
;
gtab
[
j
].
unicode_seq
=
xstrdup
(
s
);
}
}
/*tex
Then look in the parent (was default, so one can
still be sparse).
*/
if
(
k
!=
f
&&
gtab
[
j
].
code
==
UNI_UNDEF
&&
font_tounicode
(
f
))
{
tu
=
1
;
/*tex no fallback to index */
if
((
s
=
get_charinfo_tounicode
(
char_info
(
f
,
(
int
)
i
)))
!=
NULL
)
{
gtab
[
j
].
code
=
UNI_EXTRA_STRING
;
gtab
[
j
].
unicode_seq
=
xstrdup
(
s
);
}
}
if
(
!
tu
)
{
/*tex No tonunicode so we map onto index. */
gtab
[
j
].
code
=
i
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
source/texk/web2c/luatexdir/luatex_svnversion.h
+
1
−
1
View file @
6ccc24ee
#define luatex_svn_revision
6999
#define luatex_svn_revision
7000
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