Turn Your Handwriting into a Font

Standard

I was reading this blog by Christine and I thought it was a good idea to try and share it here. Turn your handwriting into a font and use it in your SAPUI5 application.

How-to-turn-your-handwriting-into-a-font-for-free.jpg

IMG_0785.PNG

Just follow the instruction from Christine’s blog above and download the output TTF file: myfont.ttf.

Now is the SAPUI5 part.

Declare the font-face and .sapMLabel tag in your CSS:

<style>

@font-face {

font-family: ‘myfont’;

src: url(‘fonts/myfont.ttf’) format(‘truetype’);

}

.sapMLabel {

font-family: ‘myfont’ !important;

font-size: 1.5rem;

font-weight: normal;

}

</style>

And print out some words:

  1. <script>
  2.   var app = new sap.m.App(“IconFontApp”, {initialPage:“page”});
  3.   var page = new sap.m.Page(“page”, {
  4.   title: “Hello World this is testing of SAPUI5”,
  5.   content : new sap.m.Label({text:“Hello Mobile World! Welcome to the SAPUI5”})
  6.   });
  7.   app.addPage(page);
  8.   app.placeAt(“content”);
  9.     </script>

The complete code can be found in the attachment.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s