r14557 by jghali - #8446, wrong pdf export of shadowed and outlined text with OTF Font : implement a workaround which looks quite like a hack

scribus-commit scribus-commit at lists.scribus.net
Thu Jan 21 00:25:20 CET 2010


Revision: 14557
Author: jghali
Date: 2010-01-20T23:24:08.679829Z
Commit message: #8446, wrong pdf export of shadowed and outlined text with OTF Font : implement a workaround which looks quite like a hack

Changeset: 
M  /branches/Version135/Scribus/scribus/pdflib_core.cpp

Diffs:
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(revision 14556)
+++ scribus/pdflib_core.cpp	(revision 14557)
@@ -4000,6 +4000,9 @@
 							{
 								ScText hl3;
 								static_cast<CharStyle&>(hl3) = static_cast<const CharStyle&>(hl2);
+								// Hack to workaround #8446, remove when we can subset OpenType fonts in other
+								// format as Type 3 (and consequently apply stroke correctly)
+								hl3.setEffects(hl3.effects() & (~ScStyle_Outline));
 								hl3.ch = hl2.ch;
 								hl3.glyph.glyph = hl2.glyph.glyph;
 								hl3.setFillColor(hl2.strokeColor());
@@ -4035,6 +4038,9 @@
 						gl2 = gl2->more;
 					}
 					static_cast<CharStyle&>(hl2) = static_cast<const CharStyle&>(*hl);
+					// Hack to workaround #8446, remove when we can subset OpenType fonts in other
+					// format as Type 3 (and consequently apply stroke correctly)
+					hl2.setEffects(hl2.effects() & (~ScStyle_Outline));
 					hl2.setFillColor(hl->strokeColor());
 					hl2.setFillShade(hl->strokeShade());
 					hl2.glyph.xadvance = hl->glyph.xadvance;
@@ -4095,6 +4101,9 @@
 						{
 							ScText hl3;
 							static_cast<CharStyle&>(hl3) = static_cast<const CharStyle&>(hl2);
+							// Hack to workaround #8446, remove when we can subset OpenType fonts in other
+							// format as Type 3 (and consequently apply stroke correctly)
+							hl3.setEffects(hl3.effects() & (~ScStyle_Outline));
 							hl3.ch = hl2.ch;
 							hl3.glyph.glyph = hl2.glyph.glyph;
 							hl3.setFillColor(hl2.strokeColor());
@@ -4123,6 +4132,9 @@
 				hl2.ch = ch;
 				hl2.glyph.glyph = hl->glyph.glyph;
 				static_cast<CharStyle&>(hl2) = static_cast<const CharStyle&>(*hl);
+				// Hack to workaround #8446, remove when we can subset OpenType fonts in other
+				// format as Type 3 (and consequently apply stroke correctly)
+				hl2.setEffects(hl2.effects() & (~ScStyle_Outline));
 				hl2.setFillColor(hl->strokeColor());
 				hl2.setFillShade(hl->strokeShade());
 				hl2.glyph.yoffset = hl->glyph.yoffset - (chstyle.fontSize() * chstyle.shadowYOffset() / 10000.0);




More information about the scribus-commit mailing list