|
From: <ai...@us...> - 2010-04-23 17:07:59
|
Revision: 10932
http://plplot.svn.sourceforge.net/plplot/?rev=10932&view=rev
Author: airwin
Date: 2010-04-23 17:07:53 +0000 (Fri, 23 Apr 2010)
Log Message:
-----------
Permanantly remove the historical momentary change to symbol font for PLplot
text escape sequences (Hershey, hexadecimal, and Greek) for specifying
unicode. The original motivation of this momentary change was Type 1 fonts
used for our ps and pdf device drivers collect most mathematical symbols in
one "symbol" font, but I have plans to deal with that issue a different way
(if the ordinary Type 1 font lookup fails to get a hit for these device
drivers, then always check the Type 1 symbol font for a hit as a last
resort). Meanwhile, the removal of the built-in momentary change to
symbol fonts allows more consistent font results for our modern devices.
This change has been conditionally removed since revision 10623, but this
complete removal gets rid of lots of conditional code and thus makes our
code much more readable.
Revision Links:
--------------
http://plplot.svn.sourceforge.net/plplot/?rev=10623&view=rev
Modified Paths:
--------------
trunk/src/plcore.c
Modified: trunk/src/plcore.c
===================================================================
--- trunk/src/plcore.c 2010-04-22 07:43:32 UTC (rev 10931)
+++ trunk/src/plcore.c 2010-04-23 17:07:53 UTC (rev 10932)
@@ -33,11 +33,6 @@
*/
#define DEBUG
-/* Disallow momentary change to symbol font for PLplot escape
- * sequences (Hershey, hexadecimal, and Greek) for specifying
- * unicode. */
-#undef PL_MOMENTARY_SYMBOL_FONT
-
#define NEED_PLDEBUG
#include "plcore.h"
@@ -621,7 +616,7 @@
if ( plsc->dev_unicode ) /* Does the device also understand unicode? */
{
PLINT ig;
- PLUNICODE fci, fcisave;
+ PLUNICODE fci;
unsigned char hexdigit, hexpower;
/* Now process the text string */
@@ -661,11 +656,6 @@
case '(': /* hershey code */
i += 2 + text2num( &string[i + 2], ')', &code );
idx = plhershey2unicode( code );
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
- unicode_buffer[j++] = fci;
-#endif
unicode_buffer[j++] = \
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
@@ -678,21 +668,12 @@
* driver.
*/
if ( unicode_buffer[j - 1] == esc ) unicode_buffer[j++] = esc;
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
- unicode_buffer[j++] = fci;
-#endif
j--;
skip = 1;
break;
case '[': /* unicode */
i += 2 + text2num( &string[i + 2], ']', &code );
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
- unicode_buffer[j++] = fci;
-#endif
unicode_buffer[j++] = code;
@@ -704,10 +685,6 @@
* driver.
*/
if ( unicode_buffer[j - 1] == esc ) unicode_buffer[j++] = esc;
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
- unicode_buffer[j++] = fci;
-#endif
j--;
skip = 1;
break;
@@ -798,11 +775,6 @@
* 527 = upper case alpha displacement in Hershey Table
* 627 = lower case alpha displacement in Hershey Table
*/
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
- unicode_buffer[j++] = fci;
-#endif
ig = plP_strpos( plP_greek_mnemonic, string[i + 2] );
if ( ig >= 0 )
@@ -825,11 +797,6 @@
skip = 1; /* skip is set if we have copied something
* into the unicode table */
}
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
- unicode_buffer[j++] = fci;
-
-#endif
j--;
break;
}
@@ -897,49 +864,17 @@
case '(': /* hershey code */
i += 2 + text2num( &string[i + 2], ')', &code );
idx = plhershey2unicode( code );
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
args.n_char = \
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
plP_esc( PLESC_TEXT_CHAR, &args );
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
-
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
skip = 1;
break;
case '[': /* unicode */
i += 2 + text2num( &string[i + 2], ']', &code );
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
-#endif
-
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
args.n_char = code;
plP_esc( PLESC_TEXT_CHAR, &args );
-
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
-
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
skip = 1;
break;
@@ -1041,15 +976,6 @@
* 527 = upper case alpha displacement in Hershey Table
* 627 = lower case alpha displacement in Hershey Table
*/
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fcisave = fci;
- plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci );
-
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
-
ig = plP_strpos( plP_greek_mnemonic, string[i + 2] );
if ( ig >= 0 )
{
@@ -1076,13 +1002,6 @@
(PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode;
plP_esc( PLESC_TEXT_CHAR, &args );
}
-#ifdef PL_MOMENTARY_SYMBOL_FONT
- fci = fcisave;
-
- args.n_fci = fci;
- args.n_ctrl_char = PLTEXT_FONTCHANGE;
- plP_esc( PLESC_CONTROL_CHAR, &args );
-#endif
break;
case 'u':
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|