X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa482912e420a40e9f2e55a0f5407562826dd15e..e3dbf5934e997729c6f4f5154b1b7f29d5d22149:/docs/latex/wx/fontmap.tex

diff --git a/docs/latex/wx/fontmap.tex b/docs/latex/wx/fontmap.tex
index c9460d4a53..fe252bc35c 100644
--- a/docs/latex/wx/fontmap.tex
+++ b/docs/latex/wx/fontmap.tex
@@ -23,28 +23,23 @@ and "interactive" is FALSE or user denied to choose any replacement),
 the class queries \helpref{wxEncodingConverter}{wxencodingconverter} 
 for "equivalent" encodings (e.g. iso8859-2 and cp1250) and tries them.
 
-\wxheading{Global variables}
-
-{\tt wxFontMapper *wxTheFontMapper} is defined.
-
 \wxheading{Using wxFontMapper in conjunction with wxEncodingConverter}
 
 If you need to display text in encoding which is not available at
 host system (see \helpref{IsEncodingAvailable}{wxfontmapperisencodingavailable}),
-you may use these two classes to a) find font in some similar encoding
+you may use these two classes to find font in some similar encoding
 (see \helpref{GetAltForEncoding}{wxfontmappergetaltforencoding})
-and
-b) convert the text to this encoding 
+and convert the text to this encoding 
 (\helpref{wxEncodingConverter::Convert}{wxencodingconverterconvert}).
 
 Following code snippet demonstrates it:
 
 \begin{verbatim}
-if (!wxTheFontMapper->IsEncodingAvailable(enc, facename))
+if (!wxFontMapper::Get()->IsEncodingAvailable(enc, facename))
 {
    wxFontEncoding alternative;
-   if (wxTheFontMapper->GetAltForEncoding(enc, &alternative,
-                                          facename, FALSE))
+   if (wxFontMapper::Get()->GetAltForEncoding(enc, &alternative,
+                                              facename, FALSE))
    {
        wxEncodingConverter encconv;
        if (!encconv.Init(enc, alternative))
@@ -80,12 +75,28 @@ No base class
 
 Default ctor.
 
+\wxheading{Note}
+
+The preferred way of creating a wxFontMapper instance is to call 
+\helpref{wxFontMapper::Get}{wxfontmapperget}.
+
 \membersection{wxFontMapper::\destruct{wxFontMapper}}\label{wxfontmapperdtor}
 
 \func{}{\destruct{wxFontMapper}}{\void}
 
 Virtual dtor for a base class.
 
+\membersection{wxFontMapper::Get}\label{wxfontmapperget}
+
+\func{static wxFontMapper *}{Get}{\void}
+
+Get the current font mapper object. If there is no current object, creates
+one.
+
+\wxheading{See also}
+
+\helpref{wxFontMapper::Set}{wxfontmapperset}
+
 \membersection{wxFontMapper::GetAltForEncoding}\label{wxfontmappergetaltforencoding}
 
 \func{bool}{GetAltForEncoding}{\param{wxFontEncoding }{encoding}, \param{wxNativeEncodingInfo* }{info}, \param{const wxString\& }{facename = wxEmptyString}, \param{bool }{interactive = TRUE}}
@@ -140,6 +151,18 @@ The parent window for modal dialogs.
 
 The title for the dialogs (note that default is quite reasonable).
 
+\membersection{wxFontMapper::Set}\label{wxfontmapperset}
+
+\func{static wxFontMapper *}{Set}{\param{wxFontMapper *}{mapper}}
+
+Set the current font mapper object and return previous one (may be NULL).
+This method is only useful if you want to plug-in an alternative font mapper
+into wxWindows.
+
+\wxheading{See also}
+
+\helpref{wxFontMapper::Get}{wxfontmapperget}
+
 \membersection{wxFontMapper::SetConfig}\label{wxfontmappersetconfig}
 
 \func{void}{SetConfig}{\param{wxConfigBase* }{config}}
