Ejemplo n.º 1
0
static NOPH_Font_t roadmap_canvas_getFont(int size) {
	static NOPH_Font_t s_fontDefault;
	static int deviceVersion = 0;
	if(!deviceVersion)
	deviceVersion = NOPH_FreemapApp_getDeviceVersion();

	if(size<=0) // the default font is too small, so set it manually. 
	size = 12;

	if(roadmap_screen_is_hd_screen()) {
		size = size * 1.6;
		if ( deviceVersion == 8900)
		size +=2; // 8900 has a bigger resolution, so use a bigger font.
		if (deviceVersion == 9100)
		size -=2;
	}

	if(!s_fontDefault)
	s_fontDefault = NOPH_Font_getDefault();

	if (size>MAX_FONT_SIZE)
	size = MAX_FONT_SIZE;

	if(static_fonts[size] == 0)
	static_fonts[size] = NOPH_Font_derive(s_fontDefault, NOPH_Font_BOLD, size);
	return static_fonts[size];
}
Ejemplo n.º 2
0
BOOL roadmap_main_no_points(void){
#ifdef RIMAPI
	int deviceVersion = NOPH_FreemapApp_getDeviceVersion();
	if(deviceVersion<8900)
		return TRUE; // old device, don't draw points since it's too slow
	else
		return FALSE;
#else
	return TRUE; // for now, don't override initial points judgement for non BB devices,
				// can be implented later if needed.
#endif
}