*** empty log message ***
[m17n/m17n-lib.git] / src / font.c
index c0e07a0..90e9db6 100644 (file)
     Narrow Bold Italic  bold    i       condensed
     Black               black   r       normal
     Black Italic        black   i       normal
-    Oblique            medium  o       normal
-    BoldOblique                bold    o       normal
+    Oblique             medium  o       normal
+    BoldOblique         bold    o       normal
 @endverbatim
 
     Style names not listed in the above table are treated as
     Narrow Bold Italic  bold    i       condensed
     Black               black   r       normal
     Black Italic        black   i       normal
-    Oblique            medium  o       normal
-    BoldOblique                bold    o       normal
+    Oblique             medium  o       normal
+    BoldOblique         bold    o       normal
 @endverbatim
 
     ¾å¤Îɽ¤Ë¸½¤ï¤ì¤Ê¤¤¥¹¥¿¥¤¥ë̾¤Ï "Regular" ¤È¤·¤Æ°·¤ï¤ì¤ë¡£
@@ -1155,24 +1155,6 @@ mfont__resize (MFont *spec, MFont *request)
       }
 }
 
-/* Return 1 if C is encodable, 0, if C is not encodable, -1 if it
-   can't be decided now.  */
-
-int
-mfont__encodable_p (MRealizedFont *rfont, MSymbol layouter_name, int c)
-{
-  MFontEncoding *encoding;
-
-  if (layouter_name != Mnil)
-    return (mfont__flt_encode_char (layouter_name, c)
-           != MCHAR_INVALID_CODE);
-  if (! rfont->encoding)
-    rfont->encoding = find_encoding (&rfont->spec);
-  encoding = rfont->encoding;
-  if (! encoding->repertory_charset)
-    return -1;
-  return (ENCODE_CHAR (encoding->repertory_charset, c) != MCHAR_INVALID_CODE);
-}
 
 unsigned
 mfont__encode_char (MRealizedFont *rfont, int c)
@@ -1187,14 +1169,13 @@ mfont__encode_char (MRealizedFont *rfont, int c)
   encoding = rfont->encoding;
   if (! encoding->encoding_charset)
     return MCHAR_INVALID_CODE;
+  if (encoding->repertory_charset
+      && ENCODE_CHAR (encoding->repertory_charset, c) == MCHAR_INVALID_CODE)
+    return MCHAR_INVALID_CODE;
   code = ENCODE_CHAR (encoding->encoding_charset, c);
   if (code == MCHAR_INVALID_CODE)
     return MCHAR_INVALID_CODE;
-  if (! encoding->repertory_charset)
-    return (rfont->driver->encode_char) (rfont, c, code);
-  if (ENCODE_CHAR (encoding->repertory_charset, c) == MCHAR_INVALID_CODE)
-    return MCHAR_INVALID_CODE;
-  return code;
+  return (rfont->driver->encode_char) (rfont, code);
 }
 
 void