Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Is there a way to get all character supported in a font with Font? (how to get all character supported by a font using Font?)
icon3.gif  Is there a way to get all character supported in a font with Font? [message #58308] Fri, 15 April 2022 21:54 Go to previous message
Mountacir is currently offline  Mountacir
Messages: 49
Registered: November 2021
Member
Hi,

I've been trying to get all code points in a font so i can preview them, but i couldn't do it with the Font Class.
I tried something like this but no luck.

char c;
String s;
for(int i = 1; i<1000;i++){
	if(fnt.HasChar(i)){
		
		c = i;
		s << c;
		
	}else {
		break;
	}
	
}
LOG(s);


In freetype.h this solutions was given

FT_ULong  charcode;                                              
FT_UInt   gindex;                                                

charcode = FT_Get_First_Char( face, &gindex );                   
while ( gindex != 0 )                                            
{                                                                
  //... do something with (charcode,gindex) pair ...               

  charcode = FT_Get_Next_Char( face, charcode, &gindex );        
}                                                                


Is it possible to add FT_Get_Next_Char and FT_Get_First_Char to Font class?

Thank you.
 
Read Message icon3.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: It can't dispay chinese characters properly
Next Topic: Clickable SetImage in Button
Goto Forum:
  


Current Time: Wed Jul 17 21:17:54 CEST 2024

Total time taken to generate the page: 0.01629 seconds