2001-11-07 23:48:17 +00:00
|
|
|
/*
|
|
|
|
******************************************************************************
|
2016-09-28 22:12:27 +00:00
|
|
|
* Copyright (C) 2016 and later: Unicode, Inc. and others. *
|
|
|
|
* License & terms of use: http://www.unicode.org/copyright.html#License *
|
|
|
|
******************************************************************************
|
|
|
|
******************************************************************************
|
2016-05-31 21:45:07 +00:00
|
|
|
* Copyright (C) 1998-2003, International Business Machines Corporation and *
|
|
|
|
* others. All Rights Reserved. *
|
2001-11-07 23:48:17 +00:00
|
|
|
******************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
2003-03-03 23:07:01 +00:00
|
|
|
#include "layout/LEFontInstance.h"
|
|
|
|
|
2001-11-07 23:48:17 +00:00
|
|
|
#include "GDIFontInstance.h"
|
|
|
|
|
|
|
|
#include "GUISupport.h"
|
|
|
|
#include "FontMap.h"
|
|
|
|
#include "GDIFontMap.h"
|
|
|
|
|
2003-03-03 23:07:01 +00:00
|
|
|
GDIFontMap::GDIFontMap(GDISurface *surface, const char *fileName, le_int16 pointSize, GUISupport *guiSupport, LEErrorCode &status)
|
2002-12-05 22:50:29 +00:00
|
|
|
: FontMap(fileName, pointSize, guiSupport, status), fSurface(surface)
|
2001-11-07 23:48:17 +00:00
|
|
|
{
|
|
|
|
// nothing to do?
|
|
|
|
}
|
|
|
|
|
|
|
|
GDIFontMap::~GDIFontMap()
|
|
|
|
{
|
|
|
|
// anything?
|
|
|
|
}
|
|
|
|
|
2003-03-03 23:07:01 +00:00
|
|
|
const LEFontInstance *GDIFontMap::openFont(const char *fontName, le_int16 pointSize, LEErrorCode &status)
|
2001-11-07 23:48:17 +00:00
|
|
|
{
|
2003-11-05 00:22:51 +00:00
|
|
|
LEFontInstance *result = new GDIFontInstance(fSurface, fontName, pointSize, status);
|
|
|
|
|
|
|
|
if (LE_FAILURE(status)) {
|
|
|
|
delete result;
|
|
|
|
result = NULL;
|
|
|
|
}
|
|
|
|
|
2003-11-05 00:47:46 +00:00
|
|
|
return result;
|
2001-11-07 23:48:17 +00:00
|
|
|
}
|