Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
3409eda2
Commit
3409eda2
authored
Mar 29, 2005
by
Kenichi Handa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ps-print-translation-table): New variable.
(ps-plot-region): Translate characters by ps-print-translation-table.
parent
073fcaf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
lisp/ps-print.el
lisp/ps-print.el
+20
-1
No files found.
lisp/ps-print.el
View file @
3409eda2
...
...
@@ -6150,6 +6150,19 @@ XSTART YSTART are the relative position for the first page in a sheet.")
(defvar ps-current-effect 0)
(defvar ps-print-translation-table
(let ((tbl (make-char-table 'translation-table nil)))
(if (and (boundp 'ucs-mule-8859-to-mule-unicode)
(char-table-p ucs-mule-8859-to-mule-unicode))
(map-char-table
#'(lambda (k v)
(if (and v (eq (char-charset v) 'latin-iso8859-1) (/= k v))
(aset tbl k v)))
ucs-mule-8859-to-mule-unicode))
tbl)
"
Translation
table
for
PostScript
printing.
The
default
value
is
a
table
that
translates
non-Latin-1
Latin
characters
to
the
equivalent
Latin-1
characters.
")
(defun ps-plot-region (from to font &optional fg-color bg-color effects)
(or (equal font ps-current-font)
...
...
@@ -6240,11 +6253,17 @@ XSTART YSTART are the relative position for the first page in a sheet.")
(ps-plot 'ps-mule-plot-composition match-point (point) bg-color))
((> match 255) ; a multi-byte character
(setq match (or (aref ps-print-translation-table match) match))
(let* ((charset (char-charset match))
(composition (ps-e-find-composition match-point to))
(stop (if (nth 2 composition) (car composition) to)))
(or (eq charset 'composition)
(while (and (< (point) stop) (eq (charset-after) charset))
(while (and (< (point) stop)
(let ((ch (following-char)))
(setq ch
(or (aref ps-print-translation-table ch)
ch))
(eq (char-charset ch) charset)))
(forward-char 1)))
(ps-plot 'ps-mule-plot-string match-point (point) bg-color)))
; characters from ^@ to ^_ and
...
...
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