Changeset 3042

Show
Ignore:
Timestamp:
03/08/03 14:38:36 (6 years ago)
Author:
himi
Message:

(ENCODING_DIMENSION, ENCODING_BYTE1MSB1)
(ENCODING_BYTE2MSB1, ENCODING_BYTE2LSB1)
(ENCODING_SHIFTJIS, ENCODING_UNICODE): Moved to a new enumerator
named MW32EncodingType.
(ENCODING_EXTERNAL): New constant.
(INITIALIZE_CCL_ID): Removed.
(MW32EncodingType): New enumerator.
(MW32Encoding): New structure.
(MW32LogicalFont): Remove encoding_type, ccl_method, and dim.
Introduce encoding instead.
(MW32_FONT_FROM_FONT_INFO): New macro.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • work/cvs2svn/src/mw32font.h

    r3013 r3042  
    2828#define LOGFONT_FACENAME_MAX 32 
    2929 
    30 /* encoding number */ 
    31  
    32 #define ENCODING_DIMENSION 0 
    33 #define ENCODING_BYTE1MSB1 1 
    34 #define ENCODING_BYTE2MSB1 2 
    35 #define ENCODING_BYTE2LSB1 3 
    36 #define ENCODING_SHIFTJIS  4 
    37 #define ENCODING_UNICODE   16 
    38  
    3930typedef struct ccl_id_type 
    4031{ 
     
    4233  int size; 
    4334} ccl_id_type; 
    44 #define INITIALIZE_CCL_ID(x) (memset(&(x), 0, sizeof(struct ccl_id_type))) 
    45  
    4635#define ENCODING_METHOD_P(obj) (!NILP(Fget((obj), Qccl_program))) 
    4736 
     
    5948 
    6049typedef int FontCp; 
     50typedef struct MW32Encoding MW32Encoding; 
    6151typedef struct MW32FontRequest MW32FontRequest; 
    6252typedef struct MW32LogicalFont MW32LogicalFont; 
     
    8676 
    8777typedef enum 
     78  { 
     79    MW32_FID_WINDOWS_FONT, 
     80    MW32_FID_BDF_FONT 
     81  } font_id; 
     82 
     83typedef enum 
     84  { 
     85    ENCODING_DIMENSION = 0, 
     86    ENCODING_BYTE1MSB1 = 1, 
     87    ENCODING_BYTE2MSB1 = 2, 
     88    ENCODING_BYTE2LSB1 = 3, 
     89    ENCODING_SHIFTJIS = 4, 
     90    ENCODING_UNICODE = 16, 
     91    ENCODING_EXTERNAL = 32 
     92  } MW32EncodingType; 
     93 
     94struct MW32Encoding 
    8895{ 
    89   MW32_FID_WINDOWS_FONT, 
    90   MW32_FID_BDF_FONT 
    91 } font_id; 
     96  MW32EncodingType type; 
     97  int font_unit_byte; 
     98  union  
     99  { 
     100    ccl_id_type ccl_method; 
     101  } e; 
     102}; 
    92103 
    93104struct MW32LogicalFont 
     
    101112  int descent; 
    102113  int overhang; 
    103   int encoding_type; 
    104114  int relative_compose; 
    105115  int default_ascent; 
    106116  int fixed_pitch; 
    107   int dim; 
    108117  int character_spacing; 
    109118  int centering; 
    110   struct ccl_id_type ccl_method; 
    111119  struct font_info *fontip; 
     120 
     121  MW32Encoding encoding; 
    112122 
    113123  /* LF methods */ 
     
    135145 
    136146#define MW32_FONT_INFO_FROM_FONT(font) ((font)->fontip) 
     147#define MW32_FONT_FROM_FONT_INFO(font_info) ((MW32LogicalFont*)(font_info)->font) 
    137148 
    138149#define MW32_INVOKE_HASHPROC(font) ((*(font)->hash)(font))