Skip to content

Instantly share code, notes, and snippets.

@indexer
Created January 20, 2014 07:32
Show Gist options
  • Save indexer/8516353 to your computer and use it in GitHub Desktop.
Save indexer/8516353 to your computer and use it in GitHub Desktop.
check mm fonts include or not in you file
Pattern p = Pattern.compile("[^\\u0000-\\u0080]+");
Matcher matcher6 = p.matcher(description);
boolean result = matcher6.find();
if(result)
{
txtprice.setTypeface(font);
}
else
{
txtprice.setTypeface(regular);
}
txtprice.setText(description);
if (!p.matcher(description).matches())
{
txtprice.setTypeface(font);
}
else {
txtprice.setTypeface(engfont);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment