I've been looking at implementing an example which uses plgfci / plsfci.
The most logical seems to be to replace calls to plfont in one or more
of the existing examples with the new functions. Comments in the source
suggest that is what users should do.

Unfortunately the way they are set up is somewhat complicated for the
end user to use. If you look at the examples in the library source (e.g.
in plsym.c) they all do something like

    PLUNICODE fci = PL_FCI_MARK;
    plP_hex2fci(PL_FCI_SANS, PL_FCI_FAMILY, &fci);
    plsfci(fci);

The plP_hex2fci helper function does the dirty working of translating
the encoding. If plgfci / plsfci are in the CAPI then we should also
have versions of plP_hex2fci / plP_fci2hex in order to deal with the
conversions. Alternatively we need user friendly versions of plgfci /
plsfci which deal with the conversion. Personally I think the latter
would be better. The user should never need to deal directly with the
internal FCI representation. The only advantage of keeping the fci
visible is that it allows the user to set up several and quickly switch
between them. 

I would propose something like

void plsfnt(unsigned char characterstic, unsigned char value);

unsigned char plgfnt(unsigned char characteristic);

e.g.

   plsfnt(PL_FCI_FAMILY,PL_FCI_SANS);
   if (plgfnt(PL_FCI_STYLE) == PL_FCI_ITALIC) {
      printf("Italic text\n");
   }

Any thoughts? Anyway, we need to do something here as plgfci / plsfci
are currently not very useable.

Andrew



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to