# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1116750186 0 # Node ID 274d87a536dc52dd19a03a5f0d1d71bc99398c96 # Parent f042e7c0fe20a53382719a141c3d34377f14da61 (x_font_name_to_mac_font_name): Sync with trunk for the case that does not require code conversion. diff -r f042e7c0fe20 -r 274d87a536dc src/macterm.c --- a/src/macterm.c Fri May 20 04:22:05 2005 +0000 +++ b/src/macterm.c Sun May 22 08:23:06 2005 +0000 @@ -6329,15 +6329,23 @@ else sprintf (mf_decoded, "%s-%s-%s", foundry, family, cs); + for (p = mf_decoded; *p; p++) + if (!isascii (*p) || iscntrl (*p)) + break; + + if (*p == '\0' + || NILP (coding_system) || NILP (Fcoding_system_p (coding_system))) + strcpy (mf, mf_decoded); #if 0 /* MAC_TODO: Fix coding system to use objects */ - if (!NILP (coding_system)) + else { setup_coding_system (coding_system, &coding); coding.src_multibyte = 1; coding.dst_multibyte = 1; coding.mode |= CODING_MODE_LAST_BLOCK; - encode_coding (&coding, family, mf, strlen (family), sizeof (Str32) - 1); + encode_coding (&coding, mf_decoded, mf, + strlen (mf_decoded), sizeof (Str32) - 1); mf[coding.produced] = '\0'; } #endif