Custom font using setclip()

i am using setClipmethod to clip font from a png file..clipping is ok wen comes to draw its not drawing in a particular position ...
here is my code ...
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class ClipImage extends MIDlet {
private Display display;
private MyCanvas canvas;
public ClipImage(){
display = Display.getDisplay(this);
canvas = new MyCanvas(this);
public void startApp() {
display.setCurrent(canvas);
public void pauseApp() {
public void destroyApp(boolean unconditional) {
public void exitMIDlet() {
destroyApp(true);
notifyDestroyed();
public Display getDisplay() {
return display;
class MyCanvas extends Canvas implements CommandListener {
private Command exit = new Command("Exit", Command.EXIT, 1);
private ClipImage clipimage;
private Image image = null;
public MyCanvas(ClipImage clipimage) {
this.clipimage = clipimage;
addCommand(exit);
setCommandListener(this);
try {
image = Image.createImage("/fn2.png");
Graphics g = image.getGraphics();
// graphics.setColor(255, 100, 255);
// graphics.fillArc(10, 10, 60, 50, 180, 180);
} catch (Exception error) {
Alert alert = new Alert("Failure", "Creating Image", null, null);
alert.setTimeout(Alert.FOREVER);
this.clipimage.getDisplay().setCurrent(alert);
public void paint(Graphics g) {
if (image != null) {
g.setColor(0xffffff);
g.fillRect(0, 0, getWidth(), getHeight());
g.setClip(2,0,11,16); //<<<<<<<
g.drawImage(image, 10,40,0); // <<<<<<<<
public void commandAction(Command command, Displayable display) {
if (command == exit) {
clipimage.exitMIDlet();
anybody pls clarify this
thanks and regards

The point of adding @font-face in the css is to use a font that is not on the client computer. There is no need to add it to windows. This works fine in a HTML file. The problem here is that ADF seems to remove the instruction from the css when the skin is compile into one big file.

Similar Messages

  • What is the best way to add and use custom fonts with Eloqua?

    We have a custom font that we'd like to use with Eloqua and were wondering how others might have successfully approached this.

    ~~Disclaimer: This answer refers to email fonts only - landing page font imports are discussed below~~
    Hi Brett,
    I took a look at these two posts: Re: Tips for getting the E10 email editor to change the email font for Outlook & other old-school email clients? and Re: E10 Fonts
    It seems that there are reasons as to why only a few of the fonts are supported. You can drill down into the source code to edit the font type, but I'm not sure that will get you anywhere.
    To drill down:
    To get the desired font & size in various clients (Gmail, Hotmail, Yahoo, Outlook) I found that specifying in the html works best.
    So whether it’s a P or TD, tag I add the style attribute & specify the font along with color & size.
    e.g.:
    <td style="LINE-HEIGHT: 18px; FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 12px;">
    Of course if you use the WYSIWYG editor you will have to view the html source & add this.

  • Using custom fonts in iBooks Author

    I have a book in South Asian (Indic) script. The encoding is Unicode. I wanted to see how different fonts would look on iPad. Using iBook Author i created two different versions of the book. One used Gujarati MT, Apple supplied font. The second used open source TTF font. It checked out fine by MacOS when I installed it. The rendering of conjuncts (which would use additional glyph present in the font file) on iBook Author  looks good. When I use "preview" function of iBook Author to see how the content would look on iPad, conjuncts dont use special glyph but only standard character (I guess GSUB is not utilized). I tried the same experiment with Arial Unicode MS and Shruti both are standard fonts provided under Windows. it appears that only Apple supplied fonts have correct glyph substitution on iPad.
    Is there a way to fix it?
    If the issue is with iBook Author, I can use another software. My book is plain text so Author is an overkill. I was using it to test embedding of custom fonts because Author is easy to use.
    If the issue is missing definition in the font that is required by iPad rendering engine, I can get the font author to enhance the font.
    I attach four images. First two are from iBook Author where rendering is correct. The next two are from iPad where rendering using non Apple font is messed up.

    rajeshfrompalo alto wrote:
    Is comment about enhancing the font to support AAT still relevant? Are you saying that iOS needs those AAT extension that macOS does not need? Is this mostly around MORX table?
    iOS (and OS X) comes with two Gujarati fonts, Gujarati MT and Gujarati Sangam MN.  So the easiest thing to do is to use one of those.   Other platforms will probably have their own default Gujarati fonts with different names.
    If you want to embed a different Gujarati font in your .ibooks format book, then you will indeed have to convert that font from OpenType to AAT before iBooks will display it correctly.   It's not true that OS X no longer needs AAT Indic fonts -- Pages for example still cannot use Opentype Indic fonts.
    To convert an Opentype Indic font to an AAT Indic font I think someone will have to add a morx table along the lines of what is contained in Gujarati MT.
    Bear in mind that iBooks Author creates a format that can only be read on an iPad (unless you want to export to PDF).  If you want to produce books for all platforms and readers, then you need to use .epub format and a different app, like Pages or Indesign.   With epub format you would probably not normally try to embed fonts but just  rely on the reader to supply whatever Gujarati font is already on the device.

  • Custom fonts on iOS app using AIR 3.9

    we are building an app for iOS using AIR 3.9 where we have to display the text using different fonts which are not available on iOS 5 or later. To fix this issue we have found a solution using XCode via ANE where by using "CTFontManagerRegisterGraphicsFont" class we can download the font from a location and register it on the device(working on mac using simulator ).  But when we are packaging the ANE with AIR 3.9, it gives us the error which says that:-
    Error occurred while packaging the application:
    Undefined symbols for architecture armv7:
      "_CTFontManagerRegisterGraphicsFont", referenced from:
          ___setPath_block_invoke in libnet.example.download.a(IOSFontLib.o)
    ld: symbol(s) not found for architecture armv7
    Compilation failed while executing : ld64
    can anyone suggest where we are going wrong!
    thanks in advance

    According to this post, using CTFontManagerRegisterGraphicsFont should still work on iOS too:
    http://stackoverflow.com/questions/4942449/ios-programmatically-add-custom-font-during-run time
    since it requires the CoreText framework have you included the following option in your <linkerOptions> set in platform.xml?
    <option>-framework CoreText</option>

  • Crash when using custom font

    I'm trying to use FontAwesome for its neat icons, and started off by doing this:
    @Override
    public void start(Stage primaryStage) {
        Label label = new Label("\uf067\uf044\uf014");
        label.setFont(Font.loadFont(getClass().getResourceAsStream("/resources/fonts/awesome.otf"), 28));
        StackPane root = new StackPane();
        root.getChildren().add(label);
        Scene scene = new Scene(root, 300, 250);
        primaryStage.setTitle("Custom Font");
        primaryStage.setScene(scene);
        primaryStage.show();
    }This code seems to work, except for the following problems:
    * Only the bottom left part of each icon is shown.
    * When I close my application, Java crashes with the following error:
    Process: java [838]
    Path: /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/bin/java
    Identifier: java
    Version: 1.0 (1.0)
    Code Type: X86-64 (Native)
    Parent Process: java [737]
    User ID: 501
    Date/Time: 2013-01-04 14:21:46.619 +0100
    OS Version: Mac OS X 10.8.2 (12C60)
    Report Version: 10
    Interval Since Last Report: 229291 sec
    Crashes Since Last Report: 7
    Per-App Crashes Since Last Report: 6
    Anonymous UUID: 26E79257-64B7-7EBA-1423-94B8139F71D1
    Crashed Thread: 25 Java: Thread-6
    Exception Type: EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Application Specific Information:
    Assertion failed: (t->numPointers == 0), function tsi_DeleteMemhandler, file src/tsimem.c, line 89.
    (and so on ... I can't post the complete error message here because the forum won't allow a post that long)
    Does anyone have any idea what's happening here, or should I just file a bug ?
    I'm using JDK 7u10 on Mac OS 10.8.2

    This seems to work fine when I use TTF instead of OTF.
    I will file it as a bug.

  • IPhone OS Use custom font

    Hi Everyone.
    I´m new here and I´ve sent lots of mail to the iPhone OS Team but with no success so I´m trying here hoping that someone could help out ...
    What I´m trying to do should be simple, but its seems it´s not that simple.
    in my iPhone App that I´m developing using the iPhone SDK I´m realy limited with the Fonts avaible on the Phone ... so I want to use a custom font in the App... A font that would be included in the Resource Bundle
    I cant get this to work at all so please pleaase if anyone here could tell me and maybe outhers how this is done I would be so happy ...
    here are some psudo code I´ve written that does not work but I think I´m on the right path ...
    NSString* fontPath = [[NSBundle mainBundle] pathForResource:@"Arial" ofType:@"ttf"];
    CGDataProviderRef fontDataProvider = CGDataProviderCreateWithFilename(fontPath);
    CGFontRef myfont = CGFontCreateWithDataProvider(fontDataProvider);
    CGContextSetFont(context, myfont);
    Please ....

    Hello,
    Has anybody been able to get this to work? I've tried combining this with the Quartz Guide's example on how to draw text and all I get is a blank screen. I even tried using the Quartz guide exactly without the custom font and it still doesn't work.
    Here is my code: (But no text displays and no errors)
    - (void)drawRect:(CGRect)rect {
    CGContextRef context = UIGraphicsGetCurrentContext();
    [self MyDrawText:context rect:rect];
    - (void)MyDrawText:(CGContextRef)myContext rect:(CGRect)contextRect
    float w, h;
    w = contextRect.size.width;
    h = contextRect.size.height;
    CGAffineTransform myTextTransform; // 2
    CGContextSelectFont (myContext, // 3
    "Times-Bold",
    h/10,
    kCGEncodingMacRoman);
    CGContextSetCharacterSpacing (myContext, 10); // 4
    CGContextSetTextDrawingMode (myContext, kCGTextFillStroke); // 5
    CGContextSetRGBFillColor (myContext, 0, 1, 0, .5); // 6
    CGContextSetRGBStrokeColor (myContext, 0, 0, 1, 1); // 7
    CGContextShowTextAtPoint (myContext, 40, 0, "Quartz 2D", 9); // 10
    }

  • Using custom fonts in the Navigation pane

    Hi
    I'm using custom fonts in my webhelp. To do this, I created a folder for the web versions of the custom fonts and put it in the same folder as my css. I then added the font face elements to the top of my css (in Notepad). Next I used the custom font name for all the style defined in the css (in Notepad). That makes the content of the topics use the custom font. All good.
    Next, I edited the htt file (in Notepad) to use the name of the custom font. Now the breadcrumbs and topic footer use the custom font. All good.
    Finally, I want to use the custom font in the navigation pane (the text next to the books and page icons). I edited the skn file (in Notepad) to use the custom font. I also added a dependency for my css to the bottom of the skn file. Then I generated the webhelp.
    When I launch the help, the browser (IE) doesn’t allow running scripts or ActiveX controls (this is normal). At this point, the TOC in the Navigation pane looks like it uses the correct font. Once I click to allow IE to run scripts, etc. the font in the TOC changes to something that looks like Times or some default serif font.  So, it appears that something in the javascript is changing the font.
    For good measure, I checked the whtdhtml file and the custom font name is used there.
    Any ideas on what's happening and how to get my custom font to appear in the Navigation pane?
    BTW, I use images only in the toolbar pane (that spans the top of the webhelp window), so I don't need to specify the custom font there.
    Deborah

    Hi William
    I found one error. In the skin file, I had added a dependency to my css. It was missing a slash (/) to point to the correct folder level. Now that I've added that, the TOC displays the same font as the Index, Search results, and the topic (content, breadcrumbs, and footer). So, that's good, but on closer inspection, it looks like Verdana, not my custom font.
    I changed the font in whthost.js to the name of my custom font and generated the help, but it made no difference. I also changed the font and just opened the help without generating and got the same results.
    For your second suggestion, you mean whtdhtml.htm not whtdhtml.js? The custom font is in the lines:
    setFont("Normal", "MyFont","10pt","Black","Normal","Normal","none");
    setFont("Hover", "MyFont","10pt","#004080","Normal","Normal","underline");
    I added the <font> tag to this file, but the tag just shows up as plain text within the webhelp TOC (no matter where I insert it in the file).
    I also tried changing the font to my custom font for the Index body and Search results using the steps in Rick's Skinny on Skins (editing the whibody.htm and whfbody.htm files). When I do this, the serif font appears in the Index body and Search results.
    It seems like the files cannot "see" my custom fonts (which are in a folder at the same level as my css).
    Deborah

  • Using custom fonts in app development?

    Could somebody inform me if it is possible to use custom fonts of choice when developing an app. If so are there any restrictions? I have read that sinds OS 3.2 iPhonesupports custom fonts, ttf and otf  fonts. Is this not the case also  for the ipad? Or am I completely off track?
    If one can add custom fonts do they work along the same lines as embedded webfonts, availale for all users even if they are not  on their ipad?
    I am a media design lecturer looking for correct info for my students who are doing the visual design voor an app.
    Thanks in advance.
    Toronot00

    Hi William
    I found one error. In the skin file, I had added a dependency to my css. It was missing a slash (/) to point to the correct folder level. Now that I've added that, the TOC displays the same font as the Index, Search results, and the topic (content, breadcrumbs, and footer). So, that's good, but on closer inspection, it looks like Verdana, not my custom font.
    I changed the font in whthost.js to the name of my custom font and generated the help, but it made no difference. I also changed the font and just opened the help without generating and got the same results.
    For your second suggestion, you mean whtdhtml.htm not whtdhtml.js? The custom font is in the lines:
    setFont("Normal", "MyFont","10pt","Black","Normal","Normal","none");
    setFont("Hover", "MyFont","10pt","#004080","Normal","Normal","underline");
    I added the <font> tag to this file, but the tag just shows up as plain text within the webhelp TOC (no matter where I insert it in the file).
    I also tried changing the font to my custom font for the Index body and Search results using the steps in Rick's Skinny on Skins (editing the whibody.htm and whfbody.htm files). When I do this, the serif font appears in the Index body and Search results.
    It seems like the files cannot "see" my custom fonts (which are in a folder at the same level as my css).
    Deborah

  • Using a custom font: Not appearing in Adobe

    I am using a custom font for a project at work. The font has been installed on my machine and works great in other programs (Microsoft Word and Open Office, for example). The font is not displaying on the font list in Flash or Photoshop, however. How can I make the font appear?

    benkay wrote:
    You are correct. That's an incredibly annoying "feature" of the Java 1.4 spec.No, it's not. It's incredibly annoying how many people think this.
    Edit: It's takes an additional 30 seconds to give something a package and that's an incredibly small price to pay for doing something right.

  • HOW TO: using custom fonts in native storyboard views from an ANE on iOS

    Hey,
      In our apps, we have embedded storyboards into an ANE, and successfully used those screens in an AIR app, and figured out how to use custom fonts in those views.
      I wrote a quick blog post about it and just thought I'd share it real quick in case it helps someone.
    ANE for iOS with Custom Framework – Using Custom Fonts | khef.co

    Hi WayHsieh,
    >>can I just "install" fonts through Word App? Does Word Apps have enough privilege to install fonts on Windows? Can I just click a button in Word App, and then it will install fonts automatically?<<
    Based on my understanding, it is hard to achieve the goal. Because the app webpage is hosted inside an Internet Explorer control which, in turn, is hosted inside an app runtime process that provides security and performance isolation and it is under
    low-Integrity level.
    Here is the figure for apps for Office runtime environment in Windows-based desktop and tablet clients:
    You can get more detail about Privacy and security from links below:
    Privacy and security for apps for Office
    Hope it is helpful.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Slow Operation of IM Using Custom Font

    I use a variation of this command in an application, and it has run sufficiently fast for years. However, with the current version of ImageMagick, it is extremely slow when I use a custom font (causing the application to hang disconcertingly). No errors are thrown, even with the -verbose tag. Does anyone know why IM is now so slow operating on a custom font, and if there is anything I can do to optimise the operation? Thanks.
    With no font specified, this command runs in a tenth of a second:
    [tony@linux ~]$ start=$(date +%s%3N) ; convert -pointsize 24 caption:"Lorem ipsum dolor sit amet" pic.png ; echo `expr $(date +%s%3N) - $start` ms
    118 ms
    With a custom font specified, the same command takes almost five seconds:
    [tony@linux ~]$ start=$(date +%s%3N) ; convert -font /usr/local/share/fonts/c/code2000.ttf -pointsize 24 caption:"Lorem ipsum dolor sit amet" pic.png ; echo `expr $(date +%s%3N) - $start` ms
    4650 ms
    Last edited by tony5429 (2014-10-12 19:06:50)

    No ideas on this issue?

  • How to set custom font family in qml label in black berry 10 os

    how to set custom font family in label text  qml in black berry 10 OS

    AFAIK, this is not the correct way to set the image location.
    We call the working directory as context, so inside the context root along with WEB-INF, maintain a folder with name img and put all the images in that directory.
    You can use either .\<image_folder> or the optimum way would be (if you are using JSPs) to use getContext() method and traverse accordingly.
    FYI,,, using getContext() will give you context root directory, from there it is as simple as accessing any other folder.
    Hope this answers your question.
    Cheers,
    Jeets.

  • Editing a PDF file on Illustrator to maintain custom font from another computer

    Hello,
    I am trying to edit a PDF file on Adobe Illustrator and the file has a custom font in it that I do not have saved on my computer/Adobe does not recognize.  Is there a way to save the file so that I can edit it, but so that Adobe does not replace the font with a basic font?
    I have tried:
    -Opening it in AcrobatPro vs. Illustrator
    -Saving the PDF (2 pages) as 2 separate JPEG files and placing them into Illustrator... That just lowers the resolution of the images and they are much lower quality/more pixelated
    -Placing the PDF file in Illustrator rather than opening it in Illustrator
    None of those worked, and now I am not sure what to do.
    Please advice ASAP- Your help is much appreciated as I am on a time crunch!
    Thank you!

    You can do it with Acrobat. Not Acrobat reader.
    It is also possible with Preview.
    Open the file in Preview and export it say to the Desktop.
    Than open the second pdf and import the file.
    Than you can delete tha parts you so not need and leave only one page.
    It can be used if the pages are not too many or it will take a long time and I am not sure if it will work with big files.

  • Urgent: Custom font style not appearing in PDF output only

    Hi,
    For a customer, I received customer specific font styles(ttf font files) which I installed on my machine and then copied those files in Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\fonts as well as in JRE/lib/fonts. Then I created a template in word and font there appears as custom font.
    Now I am getting that font style in all output formats(rtf,ppt,excel) except the PDF output. I am using Oracle BI Publisher desktop alone. Not sure what I missed because of which text font is not changing in PDF version only. I checked the PDF properties and there also custom font is not getting mapped.
    Thanks in advance.

    Here is the link that describes how to set up the font mapping for PDF output: Look for "Font Mappings (for PDF output)"
    BI Publisher Demo Library&lt;/title&gt;&lt;meta name=&quot;Title&quot; content=&quot;BI Publisher Demo Library&quot;&gt;…http://www.oracle.com/technetwork/middleware/bi-publisher/learnmore/demo-library-toc-173301.html
    Thanks,
    Bipuser

  • Custom Fonts In Oracle Report

    I have created a Custom Report (Output:PDF) using Oracle 9i, It has Custom Font, When I ran the report the custom fonts are displayed as special characters, Can someone please let me know how can i configure fonts to get picked up by report.

    Make sure you have a TTF file under the ORACLE_HOME/guicommon/tk/admin/TTF and an AFM for that missing under the ORACLE_HOME/guicommon/tk/admin/AFM directory.
    Modify the uifont.ali under the ORACLE_HOME/guicommon/tk/admin directory and add PDF Subsetting to reference the font. You'll want to open the AFM file to see what the "Font Family Name" parameter is. That is what you put on the left side of the "=" sign. The TTF file is what you reference in the right side of the equals sign. So, basically it is "Font Family Name"="TTF Font Name".
    Save the file, restart Reports Server, and run your report. Then it should work.
    IF you don't know how to generate an AFM file, I'd look at the ttf2pt1 utility. I used that utility to generate my AFM file (based on the TTF font).
    Now, this will not solve problems when sending it to the printer directly. BUt it will resolve it when generating a PDF and then printing to the printer that file output.
    Chris

Maybe you are looking for