From: Andrew R. <ar...@us...> - 2004-12-30 16:03:41
|
Update of /cvsroot/plplot/plplot/drivers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14248/drivers Modified Files: gd.c wingcc.c Log Message: Code to support unicode within plplot for drivers using freetype. Both text and symbol plotting have been "unicoded" and are now natively done by the freetype engine. Index: gd.c =================================================================== RCS file: /cvsroot/plplot/plplot/drivers/gd.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- gd.c 18 Dec 2004 03:37:46 -0000 1.37 +++ gd.c 30 Dec 2004 16:03:01 -0000 1.38 @@ -3,6 +3,7 @@ PNG, GIF, and JPEG device driver based on libgd Copyright (C) 2004 Joao Cardoso + Copyright (C) 2002, 2003, 2004 Andrew Roach This file is part of PLplot. @@ -436,6 +437,8 @@ if (freetype) { pls->dev_text = 1; /* want to draw text */ + pls->dev_unicode = 1; /* want unicode */ + init_freetype_lv1(pls); FT=(FT_Data *)pls->FT; FT->want_smooth_text=smooth_text; @@ -589,6 +592,8 @@ if (freetype) { pls->dev_text = 1; /* want to draw text */ + pls->dev_unicode = 1; /* want unicode */ + init_freetype_lv1(pls); FT=(FT_Data *)pls->FT; FT->want_smooth_text=smooth_text; Index: wingcc.c =================================================================== RCS file: /cvsroot/plplot/plplot/drivers/wingcc.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- wingcc.c 2 Sep 2004 15:14:20 -0000 1.8 +++ wingcc.c 30 Dec 2004 16:03:02 -0000 1.9 @@ -389,7 +389,7 @@ /* * Read registry to see if the user has set up default values - * for text and smoothing. These will be overridden by anything that + * for text and smoothing. These will be overriden by anything that * might be given on the command line, so we will load the * values right into the same memory slots we pass to plParseDrvOpts */ @@ -501,6 +501,7 @@ if (freetype) { pls->dev_text = 1; /* want to draw text */ + pls->dev_unicode = 1; /* want unicode */ init_freetype_lv1(pls); FT=(FT_Data *)pls->FT; FT->want_smooth_text=smooth_text; @@ -717,7 +718,6 @@ #ifdef HAVE_FREETYPE FT_Data *FT=(FT_Data *)pls->FT; #endif - Debug("Start of Page\t"); /* @@ -725,13 +725,14 @@ * reset freetype, if we have to, then reset the colours and pen width */ - BusyCursor(); - RedrawWindow(dev->hwnd,NULL,NULL,RDW_ERASE|RDW_INVALIDATE); - #ifdef HAVE_FREETYPE pl_FreeTypeBOP(); #endif + BusyCursor(); + RedrawWindow(dev->hwnd,NULL,NULL,RDW_ERASE|RDW_INVALIDATE); + + plD_state_wingcc(pls, PLSTATE_COLOR0); } @@ -814,6 +815,11 @@ case PLESC_HAS_TEXT: plD_render_freetype_text(pls, (EscText *)ptr); break; + +/* case PLESC_LIKES_UNICODE: + plD_render_freetype_sym(pls, (EscText *)ptr); + break;*/ + #endif } |