[cairo-commit] cairo/src cairo_ft_font.c,1.3,1.4

Carl Worth commit at pdx.freedesktop.org
Mon Oct 27 18:32:47 PST 2003


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv19781/src

Modified Files:
	cairo_ft_font.c 
Log Message:
Default to normal slant/weight on out-of-range values.
Add missing include of fontconfig/fcfreetype.h

Index: cairo_ft_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_ft_font.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** cairo_ft_font.c	24 Oct 2003 21:43:58 -0000	1.3
--- cairo_ft_font.c	28 Oct 2003 02:32:45 -0000	1.4
***************
*** 25,28 ****
--- 25,29 ----
  #include "cairoint.h"
  #include <fontconfig/fontconfig.h>
+ #include <fontconfig/fcfreetype.h>
  #include <freetype/freetype.h>
  
***************
*** 148,164 ****
      switch (weight)
      {
-     case CAIRO_FONT_WEIGHT_NORMAL:
-         fcweight = FC_WEIGHT_MEDIUM;
-         break;
      case CAIRO_FONT_WEIGHT_BOLD:
          fcweight = FC_WEIGHT_BOLD;
          break;
      }
  
      switch (slant)
      {
-     case CAIRO_FONT_SLANT_NORMAL:
-         fcslant = FC_SLANT_ROMAN;
-         break;
      case CAIRO_FONT_SLANT_ITALIC:
          fcslant = FC_SLANT_ITALIC;
--- 149,163 ----
      switch (weight)
      {
      case CAIRO_FONT_WEIGHT_BOLD:
          fcweight = FC_WEIGHT_BOLD;
          break;
+     case CAIRO_FONT_WEIGHT_NORMAL:
+     default:
+         fcweight = FC_WEIGHT_MEDIUM;
+         break;
      }
  
      switch (slant)
      {
      case CAIRO_FONT_SLANT_ITALIC:
          fcslant = FC_SLANT_ITALIC;
***************
*** 167,170 ****
--- 166,173 ----
  	fcslant = FC_SLANT_OBLIQUE;
          break;
+     case CAIRO_FONT_SLANT_NORMAL:
+     default:
+         fcslant = FC_SLANT_ROMAN;
+         break;
      }
  





More information about the cairo-commit mailing list