ISHELL_CreateInstance( this->m_pIShell, AEECLSID_FONTSYSNORMAL, (void**)&this->pFont );
IDISPLAY_SetFont( this->m_pIDisplay, AEE_FONT_NORMAL, this->pFont );
IDISPLAY_DrawText(this->m_pIDisplay, // Display instance
AEE_FONT_NORMAL, // Use BOLD font
m_TextRes, // Text - Normally comes from resource
-1, // -1 = Use full string length
10, // Ignored - IDF_ALIGN_CENTER
10, // Ignored - IDF_ALIGN_MIDDLE
NULL, // No clipping
IDF_TEXT_TRANSPARENT );
IDISPLAY_Update(this->m_pIDisplay);
改变AEECLSID_FONT_BASIC12参数可以改变字体大小,但只能用于英文。有什么办法吗?
18 个解决方案
#1
在模拟器上是可以控制显示的中文大小的,但手机上对字体的支持是非常有限的
#2
最新的brew有扩展字库 TrueType,如果手机支持,就能满足你的需求了,不过估计暂时支持的不多。
#3
中文的话需要字库支持的,如果没有外挂字体的话!
#4
我想用TrueType来实现,但在创建时没成功。
ITypeface* pitf;
int nErr = ISHELL_CreateInstance(me->piShell, AEECLSID_TYPEFACE, (void**)&me->pitf);
nErr 返回值为3,有人用过这种方法吗?是不是我的SDK不支持啊。
我安装的是BREW SDK3.15 bfe.msi buiw(08年-4月).msi 都在高通的官网下的。哪位高人指点下啊?
ITypeface* pitf;
int nErr = ISHELL_CreateInstance(me->piShell, AEECLSID_TYPEFACE, (void**)&me->pitf);
nErr 返回值为3,有人用过这种方法吗?是不是我的SDK不支持啊。
我安装的是BREW SDK3.15 bfe.msi buiw(08年-4月).msi 都在高通的官网下的。哪位高人指点下啊?
#5
这个要手机支持的
#6
我在模拟器调试也不行啊,急,麻烦大家帮帮忙。
#7
中文字库 需要手机支持
而且要用Unicode的编码 才能显示出来
而且要用Unicode的编码 才能显示出来
#8
3.15应该是支持的~是真机测试???真机是否有装btfe
我模拟器都可以用ttf了~是要加入注册好btfe.dll
我模拟器都可以用ttf了~是要加入注册好btfe.dll
#9
楼上的请问你去哪里弄到btfe.dll的?我没有这个库,能否贴一段代码出来参考下?这一百分送你了
#10
8偶说的应该是安装完BFE后带的那些DLL。
#11
模拟器支持TTF的话需要COPY对应的DLL和MIF到相应目录下!
#12
我把工程的目录都设了
C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\btfe\inc
C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\bbfe\inc
C:\Program Files\Qualcomm\BREWUIWidgets_1.4.3\widgets\inc
这样,行不行啊?里面很多MIF和BID等文件,不知copy哪一个。
我在一个helloworld里面试了一下,返回总是ECLASSNOTSUPPORT,是我的MIF或BID有问题吗?我的AEECLSID_TYPEFACE.bid文件是从C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\btfe\inc\bid里面COPY到当前工作目录下的。我把源码贴出来,大家帮忙分析一下,弄了几天没弄好,谢谢大家啊。
#include "AEEModGen.h"
#include "AEEAppGen.h"
#include "AEEShell.h"
#include "AEEFile.h"
#include "AEEDB.h"
#include "AEENet.h"
#include "AEESound.h"
#include "AEETapi.h"
#include "helloworld.bid"
#include "AEETypeface.h"
#include"AEECLSID_TYPEFACE.bid"
typedef struct _helloworld {
AEEApplet a ;
AEEDeviceInfo DeviceInfo;
} helloworld;
static boolean helloworld_HandleEvent(helloworld* pMe,
AEEEvent eCode, uint16 wParam,
uint32 dwParam);
boolean helloworld_InitAppData(helloworld* pMe);
void helloworld_FreeAppData(helloworld* pMe);
int AEEClsCreateInstance(AEECLSID ClsId, IShell *pIShell, IModule *po, void **ppObj)
{
*ppObj = NULL;
if( ClsId == AEECLSID_HELLOWORLD )
{
if( AEEApplet_New(sizeof(helloworld),
ClsId,
pIShell,
po,
(IApplet**)ppObj,
(AEEHANDLER)helloworld_HandleEvent,
(PFNFREEAPPDATA)helloworld_FreeAppData) )
{
if(helloworld_InitAppData((helloworld*)*ppObj))
{
//Data initialized successfully
return(AEE_SUCCESS);
}
else
{
IAPPLET_Release((IApplet*)*ppObj);
return EFAILED;
}
} // end AEEApplet_New
}
return(EFAILED);
}
static boolean helloworld_HandleEvent(helloworld* pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{
AECHAR szText[] = {'H','e','l','l','o',' ','W','o', 'r', 'l', 'd', '\0'};
int Result;
switch (eCode)
{
case EVT_APP_START:
{
ITypeface *pitf = NULL;
Result = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_TYPEFACE, (void**)&pitf);
//Result == 3?????
return(TRUE);
}
break;
default:
break;
}
return FALSE;
}
// this function is called when your application is starting up
boolean helloworld_InitAppData(helloworld* pMe)
{
pMe->DeviceInfo.wStructSize = sizeof(pMe->DeviceInfo);
ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&pMe->DeviceInfo);
return TRUE;
}
// this function is called when your application is exiting
void helloworld_FreeAppData(helloworld* pMe)
{
}
C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\btfe\inc
C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\bbfe\inc
C:\Program Files\Qualcomm\BREWUIWidgets_1.4.3\widgets\inc
这样,行不行啊?里面很多MIF和BID等文件,不知copy哪一个。
我在一个helloworld里面试了一下,返回总是ECLASSNOTSUPPORT,是我的MIF或BID有问题吗?我的AEECLSID_TYPEFACE.bid文件是从C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\btfe\inc\bid里面COPY到当前工作目录下的。我把源码贴出来,大家帮忙分析一下,弄了几天没弄好,谢谢大家啊。
#include "AEEModGen.h"
#include "AEEAppGen.h"
#include "AEEShell.h"
#include "AEEFile.h"
#include "AEEDB.h"
#include "AEENet.h"
#include "AEESound.h"
#include "AEETapi.h"
#include "helloworld.bid"
#include "AEETypeface.h"
#include"AEECLSID_TYPEFACE.bid"
typedef struct _helloworld {
AEEApplet a ;
AEEDeviceInfo DeviceInfo;
} helloworld;
static boolean helloworld_HandleEvent(helloworld* pMe,
AEEEvent eCode, uint16 wParam,
uint32 dwParam);
boolean helloworld_InitAppData(helloworld* pMe);
void helloworld_FreeAppData(helloworld* pMe);
int AEEClsCreateInstance(AEECLSID ClsId, IShell *pIShell, IModule *po, void **ppObj)
{
*ppObj = NULL;
if( ClsId == AEECLSID_HELLOWORLD )
{
if( AEEApplet_New(sizeof(helloworld),
ClsId,
pIShell,
po,
(IApplet**)ppObj,
(AEEHANDLER)helloworld_HandleEvent,
(PFNFREEAPPDATA)helloworld_FreeAppData) )
{
if(helloworld_InitAppData((helloworld*)*ppObj))
{
//Data initialized successfully
return(AEE_SUCCESS);
}
else
{
IAPPLET_Release((IApplet*)*ppObj);
return EFAILED;
}
} // end AEEApplet_New
}
return(EFAILED);
}
static boolean helloworld_HandleEvent(helloworld* pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{
AECHAR szText[] = {'H','e','l','l','o',' ','W','o', 'r', 'l', 'd', '\0'};
int Result;
switch (eCode)
{
case EVT_APP_START:
{
ITypeface *pitf = NULL;
Result = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_TYPEFACE, (void**)&pitf);
//Result == 3?????
return(TRUE);
}
break;
default:
break;
}
return FALSE;
}
// this function is called when your application is starting up
boolean helloworld_InitAppData(helloworld* pMe)
{
pMe->DeviceInfo.wStructSize = sizeof(pMe->DeviceInfo);
ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&pMe->DeviceInfo);
return TRUE;
}
// this function is called when your application is exiting
void helloworld_FreeAppData(helloworld* pMe)
{
}
#13
Result = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_TYPEFACE, (void**)&pitf);
返回值为3(ECLASSNOTSUPPORT),不知是什么原因
返回值为3(ECLASSNOTSUPPORT),不知是什么原因
#14
你的MIF和DLL没有COPY过去!按照静态应用那样!
#15
囧,错了,是动态应用!
#16
MIF和DLL应该放哪里啊?还有我在代码里面还要做什么事情吗?头文件我已经copy过来了。btfe.dll和btfe.mfx应放哪里?
#17
问题已解决,散分给大家。
#18
我也有同样的 问题 不知道怎么解决
#1
在模拟器上是可以控制显示的中文大小的,但手机上对字体的支持是非常有限的
#2
最新的brew有扩展字库 TrueType,如果手机支持,就能满足你的需求了,不过估计暂时支持的不多。
#3
中文的话需要字库支持的,如果没有外挂字体的话!
#4
我想用TrueType来实现,但在创建时没成功。
ITypeface* pitf;
int nErr = ISHELL_CreateInstance(me->piShell, AEECLSID_TYPEFACE, (void**)&me->pitf);
nErr 返回值为3,有人用过这种方法吗?是不是我的SDK不支持啊。
我安装的是BREW SDK3.15 bfe.msi buiw(08年-4月).msi 都在高通的官网下的。哪位高人指点下啊?
ITypeface* pitf;
int nErr = ISHELL_CreateInstance(me->piShell, AEECLSID_TYPEFACE, (void**)&me->pitf);
nErr 返回值为3,有人用过这种方法吗?是不是我的SDK不支持啊。
我安装的是BREW SDK3.15 bfe.msi buiw(08年-4月).msi 都在高通的官网下的。哪位高人指点下啊?
#5
这个要手机支持的
#6
我在模拟器调试也不行啊,急,麻烦大家帮帮忙。
#7
中文字库 需要手机支持
而且要用Unicode的编码 才能显示出来
而且要用Unicode的编码 才能显示出来
#8
3.15应该是支持的~是真机测试???真机是否有装btfe
我模拟器都可以用ttf了~是要加入注册好btfe.dll
我模拟器都可以用ttf了~是要加入注册好btfe.dll
#9
楼上的请问你去哪里弄到btfe.dll的?我没有这个库,能否贴一段代码出来参考下?这一百分送你了
#10
8偶说的应该是安装完BFE后带的那些DLL。
#11
模拟器支持TTF的话需要COPY对应的DLL和MIF到相应目录下!
#12
我把工程的目录都设了
C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\btfe\inc
C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\bbfe\inc
C:\Program Files\Qualcomm\BREWUIWidgets_1.4.3\widgets\inc
这样,行不行啊?里面很多MIF和BID等文件,不知copy哪一个。
我在一个helloworld里面试了一下,返回总是ECLASSNOTSUPPORT,是我的MIF或BID有问题吗?我的AEECLSID_TYPEFACE.bid文件是从C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\btfe\inc\bid里面COPY到当前工作目录下的。我把源码贴出来,大家帮忙分析一下,弄了几天没弄好,谢谢大家啊。
#include "AEEModGen.h"
#include "AEEAppGen.h"
#include "AEEShell.h"
#include "AEEFile.h"
#include "AEEDB.h"
#include "AEENet.h"
#include "AEESound.h"
#include "AEETapi.h"
#include "helloworld.bid"
#include "AEETypeface.h"
#include"AEECLSID_TYPEFACE.bid"
typedef struct _helloworld {
AEEApplet a ;
AEEDeviceInfo DeviceInfo;
} helloworld;
static boolean helloworld_HandleEvent(helloworld* pMe,
AEEEvent eCode, uint16 wParam,
uint32 dwParam);
boolean helloworld_InitAppData(helloworld* pMe);
void helloworld_FreeAppData(helloworld* pMe);
int AEEClsCreateInstance(AEECLSID ClsId, IShell *pIShell, IModule *po, void **ppObj)
{
*ppObj = NULL;
if( ClsId == AEECLSID_HELLOWORLD )
{
if( AEEApplet_New(sizeof(helloworld),
ClsId,
pIShell,
po,
(IApplet**)ppObj,
(AEEHANDLER)helloworld_HandleEvent,
(PFNFREEAPPDATA)helloworld_FreeAppData) )
{
if(helloworld_InitAppData((helloworld*)*ppObj))
{
//Data initialized successfully
return(AEE_SUCCESS);
}
else
{
IAPPLET_Release((IApplet*)*ppObj);
return EFAILED;
}
} // end AEEApplet_New
}
return(EFAILED);
}
static boolean helloworld_HandleEvent(helloworld* pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{
AECHAR szText[] = {'H','e','l','l','o',' ','W','o', 'r', 'l', 'd', '\0'};
int Result;
switch (eCode)
{
case EVT_APP_START:
{
ITypeface *pitf = NULL;
Result = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_TYPEFACE, (void**)&pitf);
//Result == 3?????
return(TRUE);
}
break;
default:
break;
}
return FALSE;
}
// this function is called when your application is starting up
boolean helloworld_InitAppData(helloworld* pMe)
{
pMe->DeviceInfo.wStructSize = sizeof(pMe->DeviceInfo);
ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&pMe->DeviceInfo);
return TRUE;
}
// this function is called when your application is exiting
void helloworld_FreeAppData(helloworld* pMe)
{
}
C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\btfe\inc
C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\bbfe\inc
C:\Program Files\Qualcomm\BREWUIWidgets_1.4.3\widgets\inc
这样,行不行啊?里面很多MIF和BID等文件,不知copy哪一个。
我在一个helloworld里面试了一下,返回总是ECLASSNOTSUPPORT,是我的MIF或BID有问题吗?我的AEECLSID_TYPEFACE.bid文件是从C:\Program Files\Qualcomm\BREWFontExtensions_2.1.5\btfe\inc\bid里面COPY到当前工作目录下的。我把源码贴出来,大家帮忙分析一下,弄了几天没弄好,谢谢大家啊。
#include "AEEModGen.h"
#include "AEEAppGen.h"
#include "AEEShell.h"
#include "AEEFile.h"
#include "AEEDB.h"
#include "AEENet.h"
#include "AEESound.h"
#include "AEETapi.h"
#include "helloworld.bid"
#include "AEETypeface.h"
#include"AEECLSID_TYPEFACE.bid"
typedef struct _helloworld {
AEEApplet a ;
AEEDeviceInfo DeviceInfo;
} helloworld;
static boolean helloworld_HandleEvent(helloworld* pMe,
AEEEvent eCode, uint16 wParam,
uint32 dwParam);
boolean helloworld_InitAppData(helloworld* pMe);
void helloworld_FreeAppData(helloworld* pMe);
int AEEClsCreateInstance(AEECLSID ClsId, IShell *pIShell, IModule *po, void **ppObj)
{
*ppObj = NULL;
if( ClsId == AEECLSID_HELLOWORLD )
{
if( AEEApplet_New(sizeof(helloworld),
ClsId,
pIShell,
po,
(IApplet**)ppObj,
(AEEHANDLER)helloworld_HandleEvent,
(PFNFREEAPPDATA)helloworld_FreeAppData) )
{
if(helloworld_InitAppData((helloworld*)*ppObj))
{
//Data initialized successfully
return(AEE_SUCCESS);
}
else
{
IAPPLET_Release((IApplet*)*ppObj);
return EFAILED;
}
} // end AEEApplet_New
}
return(EFAILED);
}
static boolean helloworld_HandleEvent(helloworld* pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{
AECHAR szText[] = {'H','e','l','l','o',' ','W','o', 'r', 'l', 'd', '\0'};
int Result;
switch (eCode)
{
case EVT_APP_START:
{
ITypeface *pitf = NULL;
Result = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_TYPEFACE, (void**)&pitf);
//Result == 3?????
return(TRUE);
}
break;
default:
break;
}
return FALSE;
}
// this function is called when your application is starting up
boolean helloworld_InitAppData(helloworld* pMe)
{
pMe->DeviceInfo.wStructSize = sizeof(pMe->DeviceInfo);
ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&pMe->DeviceInfo);
return TRUE;
}
// this function is called when your application is exiting
void helloworld_FreeAppData(helloworld* pMe)
{
}
#13
Result = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_TYPEFACE, (void**)&pitf);
返回值为3(ECLASSNOTSUPPORT),不知是什么原因
返回值为3(ECLASSNOTSUPPORT),不知是什么原因
#14
你的MIF和DLL没有COPY过去!按照静态应用那样!
#15
囧,错了,是动态应用!
#16
MIF和DLL应该放哪里啊?还有我在代码里面还要做什么事情吗?头文件我已经copy过来了。btfe.dll和btfe.mfx应放哪里?
#17
问题已解决,散分给大家。
#18
我也有同样的 问题 不知道怎么解决