comparison src/hardcopy.c @ 819:23f82b5d2814 v7.0c10

updated for version 7.0c10
author vimboss
date Wed, 05 Apr 2006 20:41:53 +0000
parents 07f7b4a7755c
children 9ab23f1e137f
comparison
equal deleted inserted replaced
818:1f929f3ca806 819:23f82b5d2814
2471 double left; 2471 double left;
2472 double right; 2472 double right;
2473 double top; 2473 double top;
2474 double bottom; 2474 double bottom;
2475 #ifdef FEAT_MBYTE 2475 #ifdef FEAT_MBYTE
2476 int props;
2476 int cmap; 2477 int cmap;
2477 char_u *p_encoding; 2478 char_u *p_encoding;
2478 struct prt_ps_encoding_S *p_mbenc; 2479 struct prt_ps_encoding_S *p_mbenc;
2479 struct prt_ps_encoding_S *p_mbenc_first; 2480 struct prt_ps_encoding_S *p_mbenc_first;
2480 struct prt_ps_charset_S *p_mbchar; 2481 struct prt_ps_charset_S *p_mbchar;
2508 2509
2509 /* Look for recognised multi-byte coding, and if the charset is recognised. 2510 /* Look for recognised multi-byte coding, and if the charset is recognised.
2510 * This is to cope with the fact that various unicode encodings are 2511 * This is to cope with the fact that various unicode encodings are
2511 * supported in more than one of CJK. */ 2512 * supported in more than one of CJK. */
2512 p_mbenc = NULL; 2513 p_mbenc = NULL;
2513 p_mbenc_first = NULL; 2514 props = enc_canon_props(p_encoding);
2514 p_mbchar = NULL; 2515 if (!(props & ENC_8BIT) && (*p_penc != NUL || *p_pmcs != NUL))
2515 for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++) 2516 {
2516 if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap], 2517 p_mbenc_first = NULL;
2518 p_mbchar = NULL;
2519 for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
2520 if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
2517 &p_mbenc)) 2521 &p_mbenc))
2518 { 2522 {
2519 if (p_mbenc_first == NULL) 2523 if (p_mbenc_first == NULL)
2520 p_mbenc_first = p_mbenc; 2524 p_mbenc_first = p_mbenc;
2521 if (prt_match_charset((char *)p_pmcs, &prt_ps_mbfonts[cmap], 2525 if (prt_match_charset((char *)p_pmcs, &prt_ps_mbfonts[cmap],
2522 &p_mbchar)) 2526 &p_mbchar))
2523 break; 2527 break;
2524 } 2528 }
2525 2529
2526 /* Use first encoding matched if no charset matched */ 2530 /* Use first encoding matched if no charset matched */
2527 if (p_mbchar == NULL && p_mbenc_first != NULL) 2531 if (p_mbchar == NULL && p_mbenc_first != NULL)
2528 p_mbenc = p_mbenc_first; 2532 p_mbenc = p_mbenc_first;
2533 }
2529 2534
2530 prt_out_mbyte = (p_mbenc != NULL); 2535 prt_out_mbyte = (p_mbenc != NULL);
2531 if (prt_out_mbyte) 2536 if (prt_out_mbyte)
2532 { 2537 {
2533 /* Build CMap name - will be same for all multi-byte fonts used */ 2538 /* Build CMap name - will be same for all multi-byte fonts used */