home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / cuvfm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.4 KB  |  64 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. /* , 1997 */
  19. //--------------------------------------------------------------------------------------------------------
  20. //    Author: Frank Tang ftang@netscape.com x2913
  21. //
  22. //    Unicode Virtual Font Manager used for Unicode rendering 
  23. //--------------------------------------------------------------------------------------------------------
  24. #ifndef __CUVFM_H
  25. #define __CUVFM_H
  26. #include "stdafx.h"
  27. #include "cvffc.h"
  28. //------------------------------------------------------------------------------------------------
  29. //
  30. //    CUnicodeVirtualFontMgr
  31. //
  32. //    The constructor save the font on dc
  33. //  The destructor restore the font on dc
  34. //
  35. //------------------------------------------------------------------------------------------------
  36. class CUnicodeVirtualFontMgr {
  37. public:
  38.     CUnicodeVirtualFontMgr(HDC in_hdc);
  39.     ~CUnicodeVirtualFontMgr();
  40. //#ifdef netscape_font_module
  41.     CyaFont *CUnicodeVirtualFontMgr::GetCsidCyaFont(HDC hdc, int16 encoding);
  42. //#endif  //netscape_font_module
  43.     CFont* GetCsidFont(int16 encoding);
  44.     static void ExitInstance();
  45.     int        CacularAscentDelta(HDC hDC);
  46. private:
  47.     CFont*    CreateFont(int16 encoding);
  48. //#ifdef netscape_font_module
  49.     CyaFont*    CreateCyaFont(HDC hdc, int16 encoding);
  50.     BOOL    GetCyaFontFromCache(int16 encoding, CyaFont*& pFont);
  51.     BOOL    AddCyaFontToCache(int16 encoding, CyaFont* pFont);
  52. //#endif  //netscape_font_module
  53.     void    UpdateLOGFONTForEncoding(int16 encoding);
  54.     BOOL    GetFontFromCache(int16 encoding, CFont*& pFont);
  55.     BOOL    AddFontToCache(int16 encoding, CFont* pFont);
  56. private:
  57.     HDC        m_DC;
  58.     HFONT    m_OrigFont;
  59.     LOGFONT    m_lf;
  60.     BOOL    m_bFixed;
  61.     int        m_iOrigAscent;
  62. };
  63. #endif
  64.