[stsf-commit] stsf/STClientLibrary/src STGlyphVector.c, 1.7, 1.8 STLine.c, 1.6, 1.7 STSysCtl.c, 1.3, 1.4 sysctlvars.h, 1.3, 1.4

Alan Coopersmith stsf-commit at pdx.freedesktop.org
Mon Feb 28 19:15:07 PST 2005


Committed by: alanc


Index: STGlyphVector.c
===================================================================
RCS file: /cvs/stsf/stsf/STClientLibrary/src/STGlyphVector.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- STGlyphVector.c	2 Jul 2004 05:00:11 -0000	1.7
+++ STGlyphVector.c	1 Mar 2005 03:15:05 -0000	1.8
@@ -55,6 +55,7 @@
 #include <math.h>
 
 #include "stclprivate.h"
+#include "sysctlvars.h"
 
 #ifdef PREFETCH_GLYPHS
 #if HAVE_ALLOCA_H
@@ -863,7 +864,7 @@
     for (i=0; i<p->glyphCount+delta; i++) {
         q[i]->styleHandle = StyleManagerGetIndex(p->styles, (STStyle) q[i]->styleHandle);
     }
-    for (i=0; i<p->glyphCount; i++) {
+    for (i=start; i<start+count; i++) {
         p->glyphs[i]->styleHandle = StyleManagerGetIndex(p->styles, (STStyle)p->glyphs[i]->styleHandle);
     }
 
@@ -1149,7 +1150,11 @@
         }
         if (smask & ST_SM_EFFECTS) {              /* DEFAULT: do not apply algorithmic styles */
             if (effects & ST_SE_EMBOLDEN) {
-                rflags |= FS_RF_EMBOLDEN;
+                if (SCEmboldenBitmaps) {
+                    rflags |= FS_RF_EMBOLDENBITMAPS;
+                } else {
+                    rflags |= FS_RF_EMBOLDEN;
+                }
             }
             if (effects & ST_SE_ITALICIZE) {
                 rflags |= FS_RF_ITALICISE;

Index: STLine.c
===================================================================
RCS file: /cvs/stsf/stsf/STClientLibrary/src/STLine.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- STLine.c	2 Jul 2004 05:00:11 -0000	1.6
+++ STLine.c	1 Mar 2005 03:15:05 -0000	1.7
@@ -58,6 +58,7 @@
 #include "stmath.h"
 #include "stsfutil.h"
 #include "STTextChunk.h"
+#include "sysctlvars.h"
 
 #define DESIGN_TO_USER_SPACE(a,size)    ( (a) * (size) / 1000 )
 
@@ -264,7 +265,11 @@
                 styleRenderFlags |= FS_RF_SBITS;
             }
             if (styleEffects & ST_SE_EMBOLDEN) {
-                styleRenderFlags |= FS_RF_EMBOLDEN;
+                if (SCEmboldenBitmaps) {
+                    styleRenderFlags |= FS_RF_EMBOLDENBITMAPS;
+                } else {
+                    styleRenderFlags |= FS_RF_EMBOLDEN;
+                }
             }
             if (styleEffects & ST_SE_ITALICIZE) {
                 styleRenderFlags |= FS_RF_ITALICISE;
@@ -682,7 +687,11 @@
             }
 
             if (styleEffects & ST_SE_EMBOLDEN) {
-                styleRenderFlags |= FS_RF_EMBOLDEN;
+                if (SCEmboldenBitmaps) {
+                    styleRenderFlags |= FS_RF_EMBOLDENBITMAPS;
+                } else {
+                    styleRenderFlags |= FS_RF_EMBOLDEN;
+                }
             }
 
             if (styleEffects & ST_SE_ITALICIZE) {

Index: STSysCtl.c
===================================================================
RCS file: /cvs/stsf/stsf/STClientLibrary/src/STSysCtl.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- STSysCtl.c	2 Jul 2004 05:00:12 -0000	1.3
+++ STSysCtl.c	1 Mar 2005 03:15:05 -0000	1.4
@@ -73,6 +73,10 @@
                                                            or whether it should return the error code 
                                                            so that the client can take care of all the
                                                            glyph data before it goes away */
+
+uint32_t SCEmboldenBitmaps = 0;                         /* Whether STSF should be emboldening bitmaps instead
+                                                           of performing algorithmic emboldening of characters.
+                                                           This is a hack for the XFT bridge */
 /*
  */
 
@@ -149,12 +153,18 @@
         // READ - always
         if ((t = varout(oldp, oldlenp, &SCAmountToChecksum, sizeof SCAmountToChecksum)) != ST_OK) {
             return t;
-        
         }
         // WRITE - never
         if (newp != NULL) {
             t = ST_PROTECTION;
         }
+    } else if (!strcmp(name, "fontserver.emboldenbitmaps")) {
+        // READ - always
+        if ((t = varout(oldp, oldlenp, &SCEmboldenBitmaps, sizeof SCEmboldenBitmaps)) != ST_OK) {
+            return t;
+        }
+        // WRITE - always
+        t = varin(&SCEmboldenBitmaps, sizeof SCEmboldenBitmaps, newp, newlen);
     }
             
     return t;

Index: sysctlvars.h
===================================================================
RCS file: /cvs/stsf/stsf/STClientLibrary/src/sysctlvars.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sysctlvars.h	2 Jul 2004 05:00:12 -0000	1.3
+++ sysctlvars.h	1 Mar 2005 03:15:05 -0000	1.4
@@ -54,6 +54,7 @@
 extern uint32_t SCPayloadSize;
 extern uint32_t SCAmountToChecksum;
 extern uint32_t SCSharedCacheNotifyClear;
+extern uint32_t SCEmboldenBitmaps;
 
 #endif /* __SYSCTL_H */
 



More information about the stsf-commit mailing list