Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How to draw italic text

How to draw italic text

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How to draw italic text

Postby Michael_Matveev » Wed Jan 23, 2008 11:53 pm

I’m trying to set a text style to italic.
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. public class Label extends GraphObject  {
  3.  
  4.         public static final Paint DEFAULT_PAINT;
  5.  
  6.        
  7.  
  8.         static {
  9.  
  10.                 DEFAULT_PAINT = new Paint();
  11.  
  12.                 DEFAULT_PAINT.setTextSize(10);
  13.  
  14.                 DEFAULT_PAINT.setColor(Color.WHITE);
  15.  
  16.                 DEFAULT_PAINT.setTypeface(Typeface.DEFAULT_ITALIC);
  17.  
  18.         }
  19.  
  20. . . .
  21.  
  22.  
  23.  
  24. }
  25.  
  26.  
Parsed in 0.011 seconds, using GeSHi 1.0.8.4

And then try to show it:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. canvas.drawText(label.getText(), label.getX(), label.getY(), Label.DEFAULT_PAINT);
  3.  
  4.  
Parsed in 0.010 seconds, using GeSHi 1.0.8.4

… but it doesn’t show up in italic! May I did something wrong?
&&dev
Michael_Matveev
Freshman
Freshman
 
Posts: 6
Joined: Wed Jan 16, 2008 12:42 am

Top

Postby Ishtar » Fri Jan 25, 2008 11:51 pm

Ya,, i didnt quite get that part of the api either. Seems like there are to ways to specify the style.. This is what i use to get it bold, and it does get bold ;)
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Typeface.create(Typeface.DEFAULT_BOLD, Typeface.BOLD);
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


Ishtar
Ishtar
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Wed Jan 16, 2008 10:22 pm
Location: Netherlands

Postby Michael_Matveev » Tue Jan 29, 2008 5:54 pm

Unfortunatelly italic style cannot be set now. See http://wiki.droiddocs.net/KB-20071223-038
&&dev
Michael_Matveev
Freshman
Freshman
 
Posts: 6
Joined: Wed Jan 16, 2008 12:42 am

Top

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests