Changeset 3013

Show
Ignore:
Timestamp:
2003年02月22日 10時52分24秒 (6 years ago)
Author:
miyoshi
Message:

* mw32font.c (Qcentering): New variable.
(mw32_set_windows_logical_font): Invalidate vertical centering.
(mw32_set_bdf_font): Ditto.
(set_font_info): Validate vertical centering if the centering flag
of the font is true or the font request matches
vertical-centering-font-regexp.
(mw32_default_hash_function): Take account of `centering'.
(mw32_lf_equal): Ditto.
(mw32_set_option_alist_to_logical_font): Ditto.
(mw32_check_font_request_alist): Ditto.
(syms_of_mw32font): Initialize `Qcentering'.

* mw32font.h (struct MW32LogicalFont): New member variable
`centering'.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • work/cvs2svn/src/ChangeLog.Meadow

    r3006 r3013  
     12003-02-22  MIYOSHI Masanori  <miyoshi@boreas.dti.ne.jp> 
     2 
     3        * mw32font.c (Qcentering): New variable. 
     4        (mw32_set_windows_logical_font): Invalidate vertical centering. 
     5        (mw32_set_bdf_font): Ditto. 
     6        (set_font_info): Validate vertical centering if the centering flag 
     7        of the font is true or the font request matches 
     8        vertical-centering-font-regexp. 
     9        (mw32_default_hash_function): Take account of `centering'. 
     10        (mw32_lf_equal): Ditto. 
     11        (mw32_set_option_alist_to_logical_font): Ditto. 
     12        (mw32_check_font_request_alist): Ditto. 
     13        (syms_of_mw32font): Initialize `Qcentering'. 
     14 
     15        * mw32font.h (struct MW32LogicalFont): New member variable 
     16        `centering'. 
     17 
    1182003-02-20  MIYASHITA Hisashi  <himi@meadowy.org> 
    219 
  • work/cvs2svn/src/mw32font.c

    r2999 r3013  
    4545Lisp_Object Qoverhang, Qrelative_compose, Qdefault_ascent; 
    4646Lisp_Object Qencoding_type, Qencoder; 
    47 Lisp_Object Qspacing, Qdim
     47Lisp_Object Qspacing, Qdim, Qcentering
    4848 
    4949Lisp_Object Qbase, Qweight, Qfixed, Qitalic; 
     
    448448      plf->default_ascent = 0; 
    449449      plf->character_spacing = 0; 
     450      plf->centering = 0; 
    450451 
    451452      pwf->ttfp = (tm.tmPitchAndFamily & TMPF_TRUETYPE); 
     
    578579      plf->dim = 1; 
    579580      plf->encoding_type = 0; 
     581      plf->centering = 0; 
    580582      INITIALIZE_CCL_ID(plf->ccl_method); 
    581583    } 
     
    720722      fontp->encoding[1] = plf->encoding_type; 
    721723    } 
    722   fontp->vertical_centering 
    723     = (STRINGP (Vvertical_centering_font_regexp) 
    724        && (fast_c_string_match_ignore_case  
    725            (Vvertical_centering_font_regexp, fontp->full_name) >= 0)); 
     724  if (plf->centering 
     725      || (STRINGP (Vvertical_centering_font_regexp) 
     726          && (fast_c_string_match_ignore_case 
     727              (Vvertical_centering_font_regexp, fontp->full_name) >= 0))) 
     728    fontp->vertical_centering = 1; 
    726729} 
    727730 
     
    13171320  hashval = (hashval << 1) ^ plf->fixed_pitch; 
    13181321  hashval = (hashval << 1) ^ plf->dim; 
     1322  hashval = (hashval << 1) ^ plf->centering; 
    13191323  if (hashval > HASHMAXVAL) hashval %= HASHMAXVAL; 
    13201324  hashval = hashval ^ mw32_hash_ccl_method(plf->ccl_method); 
     
    13521356          && LF_EQUAL_ELEM (fixed_pitch) 
    13531357          && LF_EQUAL_ELEM (dim) 
     1358          && LF_EQUAL_ELEM (centering) 
    13541359          && LF_EQUAL_ELEM (hash) 
    13551360          && LF_EQUAL_ELEM (textout) 
     
    16291634 
    16301635  val = mw32_get_font_request_parameter (Qencoding_type, option); 
    1631   if (INTEGERP(val)) plf->encoding_type = XINT(val); 
     1636  if (INTEGERP (val)) plf->encoding_type = XINT (val); 
    16321637  val = mw32_get_font_request_parameter (Qencoder, option); 
    1633   if (SYMBOLP(val)) plf->ccl_method = mw32_get_ccl_id(val); 
     1638  if (SYMBOLP (val)) plf->ccl_method = mw32_get_ccl_id (val); 
    16341639  val = mw32_get_font_request_parameter (Qrelative_compose, option); 
    1635   if (INTEGERP(val)) plf->relative_compose = XINT(val); 
     1640  if (INTEGERP (val)) plf->relative_compose = XINT (val); 
    16361641  val = mw32_get_font_request_parameter (Qdefault_ascent, option); 
    1637   if (INTEGERP(val)) plf->default_ascent = XINT(val); 
     1642  if (INTEGERP (val)) plf->default_ascent = XINT (val); 
    16381643  val = mw32_get_font_request_parameter (Qspacing, option); 
    1639   if (INTEGERP(val)) plf->character_spacing = XINT(val); 
     1644  if (INTEGERP (val)) plf->character_spacing = XINT (val); 
    16401645  val = mw32_get_font_request_parameter (Qdim, option); 
    1641   if (INTEGERP(val)) plf->dim = XINT(val); 
     1646  if (INTEGERP (val)) plf->dim = XINT (val); 
     1647  val = mw32_get_font_request_parameter (Qcentering, option); 
     1648  if (!NILP (val)) plf->centering = 1; 
    16421649} 
    16431650 
     
    21722179  Lisp_Object width, height, base, overhang, encoding_type; 
    21732180  Lisp_Object relative_compose, default_ascent, encoder; 
    2174   Lisp_Object spacing, dim
     2181  Lisp_Object spacing, dim, centering
    21752182 
    21762183  width = mw32_get_font_request_parameter(Qwidth, alist); 
     
    21842191  spacing = mw32_get_font_request_parameter(Qspacing, alist); 
    21852192  dim = mw32_get_font_request_parameter(Qdim, alist); 
     2193  centering = mw32_get_font_request_parameter(Qcentering, alist); 
    21862194 
    21872195  if (!NILP(width)) CHECK_NUMBER(width, 2); 
     
    21972205  if (!NILP(spacing)) CHECK_NUMBER(spacing, 9); 
    21982206  if (!NILP(dim)) CHECK_NUMBER(dim, 10); 
     2207  if (!NILP(centering))CHECK_SYMBOL(dim, 11); 
    21992208} 
    22002209 
     
    26802689  Qdim = intern ("dim"); 
    26812690  staticpro (&Qdim); 
     2691  Qcentering = intern ("centering"); 
     2692  staticpro (&Qcentering); 
    26822693 
    26832694  DEFVAR_LISP ("w32-system-coding-system", 
  • work/cvs2svn/src/mw32font.h

    r2999 r3013  
    107107  int dim; 
    108108  int character_spacing; 
     109  int centering; 
    109110  struct ccl_id_type ccl_method; 
    110111  struct font_info *fontip;