Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

add custom font to android paint object

Typeface plain = Typeface.createFromAsset(assetManager, pathToFont); 
Typeface bold = Typeface.create(plain, Typeface.DEFAULT_BOLD)
Paint paint = new Paint();
paint.setTypeface(bold);
canvas.drawText("Sample text in bold",0,0,paint);
Comment

PREVIOUS NEXT
Code Example
Java :: uses or overrides a deprecated API. 
Java :: how to subtract localdatetime in java 
Java :: java int array to integer arraylist 
Java :: Imageview on the bottom left of Imageview android anchor 
Java :: his version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.2 or newer. 
Java :: how to stop activity from another activity 
Java :: java base64 to file 
Java :: word count in a string using HashMap Collection 
Java :: change status bar text color android programmatically 
Java :: initialize an array in java 
Java :: sort a list with custom comparator java 
Java :: swing getsource 
Java :: java round up 
Java :: java string from byte array 
Java :: setting java home 
Java :: hashmap in java 
Java :: Java User Input (Scanner) 
Java :: java get class name of object 
Java :: split with multiple condition in java 
Java :: how to empty list in java 
Java :: spring valid request body custom message 
Java :: binary to decimal java 
Java :: variables inside strings kotlin 
Java :: check if optional is empty java 
Java :: input using stringbuffer 
Java :: Design a class ‘Complex ‘with data members for real and imaginary part. Provide default and Parameterized constructors. Write a program to perform arithmetic operations of two complex numbers. 
Java :: java fields 
Java :: get max of array java 
Java :: exit an if statement java 
Java :: default java keystore 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =