changeset 64645:e4b9a37feb33

(bdf-read-font-info): Ignore glyphs whose ENCODING is negative.
author Kenichi Handa <handa@m17n.org>
date Wed, 27 Jul 2005 07:59:54 +0000
parents 734c19798185
children 9bee98496ab5
files lisp/ps-bdf.el
diffstat 1 files changed, 14 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ps-bdf.el	Wed Jul 27 07:59:17 2005 +0000
+++ b/lisp/ps-bdf.el	Wed Jul 27 07:59:54 2005 +0000
@@ -272,18 +272,20 @@
 	    (while (search-forward "\nSTARTCHAR" nil t)
 	      (setq offset (line-beginning-position))
 	      (search-forward "\nENCODING")
-	      (setq code (read (current-buffer))
-		    code0 (lsh code -8)
-		    code1 (logand code 255)
-		    min-code (min min-code code)
-		    max-code (max max-code code)
-		    min-code0 (min min-code0 code0)
-		    max-code0 (max max-code0 code0)
-		    min-code1 (min min-code1 code1)
-		    max-code1 (max max-code1 code1))
-	      (search-forward "ENDCHAR")
-	      (setq maxlen (max maxlen (- (point) offset))
-		    glyph-list (cons (cons code offset) glyph-list)))
+	      (setq code (read (current-buffer)))
+	      (if (< code 0)
+		  (search-forward "ENDCHAR")
+		(setq code0 (lsh code -8)
+		      code1 (logand code 255)
+		      min-code (min min-code code)
+		      max-code (max max-code code)
+		      min-code0 (min min-code0 code0)
+		      max-code0 (max max-code0 code0)
+		      min-code1 (min min-code1 code1)
+		      max-code1 (max max-code1 code1))
+		(search-forward "ENDCHAR")
+		(setq maxlen (max maxlen (- (point) offset))
+		      glyph-list (cons (cons code offset) glyph-list))))
 
 	    (setq code-range
 		  (vector min-code0 max-code0 min-code1 max-code1