How to Replace the Font File (*.ttf) for HTML Printing Function: Difference between revisions
(Created page with "# Copy font file to assets folder # The html content like follows: <syntaxhighlight lang="java"> <!DOCTYPE html> <html> <head> <style type="text/css"> @font-face {...") |
No edit summary |
||
Line 1: | Line 1: | ||
# Copy font file to assets folder | # Copy font file such as ABC.TTF to assets folder of app project | ||
# The html content | # The html content as follows: | ||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
<!DOCTYPE html> | <!DOCTYPE html> | ||
Line 8: | Line 8: | ||
@font-face { | @font-face { | ||
font-family:TestFont; | font-family:TestFont; | ||
src:url('file:///android_asset/ | src:url('file:///android_asset/ABC.TTF'); | ||
} | } | ||
#div1 { | #div1 { |
Revision as of 07:10, 8 June 2020
- Copy font file such as ABC.TTF to assets folder of app project
- The html content as follows:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
@font-face {
font-family:TestFont;
src:url('file:///android_asset/ABC.TTF');
}
#div1 {
font-family:TestFont;
font-size :30px;
}
</style>
</head>
<body>
<!--add picture-->
<!--<img src="file:///android_asset/cloudpos.png">-->
<h2>For example,custom font:</h2>
<div id="div1">
We use smart solution to
<br/>
connect business and
<br/>
customers!
<br/>
What We Do?
<br/>
wizarPOS
Connect Business
and Customers
With Innovations
<br/>
WizarPOS is dedicated to developing
secure, trusted, affordable and intelligent
product platform to enable innovations
in the business world.
</div>
It has many functions.Waiting for you to find out!
</body>
</html>