Set diferent font in a paragraph text.

In xml file,there is the following element:
When I open the xml file in FrameMaker,the font of string "ZCCC2.1" should Times new roman,the font of string "ADCCCCCCCC" should another font.
In EDD,title element is a framemaker element.How Can I deal with the problem when I open the xml file?

Bummer! Thanks for letting me know, so I can stop banging my head against the wall trying to figure it out.
Your approach with the dummy font is clever, but won't help me in this case. I'm trying to automate the "Find Font" process for a group of users. They've used a particular group of fonts for thousands of files, and are switching to a different family of fonts. They want to have ONLY the new family installed. So I wanted to create a script they could run the first time they open each file that would find each old font and replace it with the new font. My script works great for all the text in the file, but not the Paragraph and Character styles.
Can anyone think of another approach? I'm out of ideas on this one.

Similar Messages

  • Setting a font on a PSD text item in javascript?

    Hi there,
    I'm new to photoshop scripting and am having a bit of trouble editing a text layer in Photoshop using javascript.
    I have a few PSD templates in which I'd like to replace text on specific layers with javascript before generating hundreds of animated GIFs. I have placeholder text on the target layers and have been able to replace it with:
    "textItemRef.contents = "Hello, world";
    however this loses ALL text formatting. Is there a different way to replace existing text keeping sizes/colors/fonts in tact? All examples I can find create new layers needing all the attributes. I've tried assigning a paragraph style to the placeholder text using Photoshop cc 2014 stylesheets but that doesn't retain styles when the text is replaced, either.
    I also can't find mention of TEXT STYLESHEETS in the scripting guides or photoshop DOM references, presumably because they're so new? If anyone has been able to assign TEXT styles, what is the syntax? Or is there one for clearing overrides if that's possible?
    If the only way IS to style everything one attribute at a time, I am having problems with the font attribute. var myFont = app.fonts.getByName("Arial"); does not seem to work.

    A follow-up for anyone experiencing this dropped style on a layer when importing new content... it turns out using paragraph styles AT ALL on a layer will make that layer lose its style when new text is imported with javascript (for some reason photoshop then incorrectly assumes you want to reset the formatting of the new layer to the DEFAULT paragraph style). This is the complete opposite of the results you'd want to use stylesheets to attain in the first place. But, starting with a layer that has only been manually styled with the font menus and character menu items will hold its attributes when importing new text.
    I've recorded and copied below the ActionManager script happening behind the scenes when importing text, and all Photoshop does with the stylesheets because I've used a paragraph style:
    // =======================================================
    var idAdobeScriptAutomationScripts = stringIDToTypeID( "AdobeScriptAutomation Scripts" );
        var desc459 = new ActionDescriptor();
        var idjsCt = charIDToTypeID( "jsCt" );
        desc459.putPath( idjsCt, new File( "/Applications/Adobe Photoshop CC 2014/Presets/Scripts/one-text-line-to-hdln.jsx" ) );
        var idjsMs = charIDToTypeID( "jsMs" );
        desc459.putString( idjsMs, """this is text""" );
    executeAction( idAdobeScriptAutomationScripts, desc459, DialogModes.NO );
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc460 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref36 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idparagraphStyle = stringIDToTypeID( "paragraphStyle" );
            ref36.putProperty( idPrpr, idparagraphStyle );
            var idTxLr = charIDToTypeID( "TxLr" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref36.putEnumerated( idTxLr, idOrdn, idTrgt );
        desc460.putReference( idnull, ref36 );
        var idT = charIDToTypeID( "T   " );
            var desc461 = new ActionDescriptor();
            var idstyleSheetName = stringIDToTypeID( "styleSheetName" );
            desc461.putString( idstyleSheetName, """Basic Paragraph""" );
            var idtypeStyleOperationType = stringIDToTypeID( "typeStyleOperationType" );
            desc461.putInteger( idtypeStyleOperationType, 1 );
        var idparagraphStyle = stringIDToTypeID( "paragraphStyle" );
        desc460.putObject( idT, idparagraphStyle, desc461 );
    executeAction( idsetd, desc460, DialogModes.NO );
    Now the same actions with no style applied to the layer getting new text.

  • 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.

  • How to set the desired font to the selected text in textframe?

    Hi,
    I want to change the font(let's say Times New Roman) of selected text in textframe when I click on  menu-item of my plug-in.
    I went through the Adobe Text Engine documentation and  tried some code for setting font but failed. I don't see any member function in IFont class to set desired font, so unable to move forward.
    plz see the code. I would like to know one more thing that how can we set a particular font for a textframe?
    TextRangesRef rangesRef = NULL;
    result = sAIDocument->GetTextSelection(&rangesRef);
    aisdk::check_ai_error(result);
    ITextRanges ranges(rangesRef);
    if (ranges.GetSize() > 0)
         ITextRange range = ranges.Item(0);
         ICharFeatures features = range.GetUniqueLocalCharFeatures();
         IFont  font;                     // I don't see any method to put desired font.
       // features.SetFont(); 
    Thanks.
    D.A

    First, get the font:
    AIFontKey fontKey = 0;
    AIErr error = sAIFont->FindFont("Times New Roman Regular", kAIAnyFontTechnology, kNativeAIScript, 0, &fontKey);
    // do something with error
    ATE::FontRef fontRef = 0;
    error = sAIFont->FontFromFontKey(fontKey, &fontRef);
    // do something with error
    ATE::IFont font(fontRef);
    Then, apply it like this:
    ATE::TextRangeRef textRangeRef = 0;
    AIErr error = sAITextFrame->GetATETextRange(handle_to_artwork, &textRangeRef);
    // check error
    ATE::ITextRange textRange(textRangeRef);
    ATE::ICharFeatures charFeatures = textRange.GetUniqueLocalCharFeatures();
    charFeatures.SetFont(font);
    textRange.ReplaceOrAddLocalCharFeatures(charFeatures);
    There are a few other ways to set the text, but you need to understand how character & paragraph styles interact with each other to understand the differneces. This is the most straight forward way to do it though.

  • Setting Font for converting multiple text files into PDF using VB 6.0

    Dear All,
    Am converting multiple text files into PDF using VB6.0. Currently, am unable to control the font face and size for the generated files. Below is the procedure am using for each file;
    Public Sub proc_convert_to_PDF(srcFilename As String, destFilename As String)
    Dim p_AcroApp As CAcroApp
    Dim p_VDoc As CAcroAVDoc
    Dim p_DDoc As CAcroPDDoc
    Dim IsOk As Boolean
    Set p_AcroApp = CreateObject("AcroExch.App")
    Set p_VDoc = CreateObject("AcroExch.AVDoc")
    Call p_VDoc.Open(srcFilename, "")
    Set p_VDoc = p_AcroApp.GetActiveDoc
    If p_VDoc.IsValid Then
    Set p_DDoc = p_VDoc.GetPDDoc
    ' Fill in pdf properties.
    p_DDoc.SetInfo "Title", Format(Date, "dd-mm-yyy")
    p_DDoc.SetInfo "Subject", srcFilename
    If p_DDoc.Save(1 Or 4 Or 32, destFilename) <> True Then
    MsgBox "Failed to save " & srcFilename
    End If
    p_DDoc.Close
    End If
    'Close the PDF
    p_VDoc.Close True
    p_AcroApp.Exit
    'Clear Variables
    Set p_DDoc = Nothing
    Set p_VDoc = Nothing
    Set p_AcroApp = Nothing
    End Sub
    What I need;
    1) to be able to set the font face of the destination file ( destFilename)
    2) to be able to set the font size of the destination file ( destFilename)
    Am using Adobe Acrobat 7.0 Type Library
    Kindly Help.
    Thanks in advance

    We didn't say it doesn't work. We said it isn't supported.
    There are a number of other ways to make a PDF. The one which would
    give the most control is if your application directly printed to GDI,
    controlling the font directly. This could print to Adobe PDF.
    You could look for an application that gives control of font for
    printing.
    You could use a text-to-PostScript system and distill the result. You
    could even look for a non-Adobe text-to-PDF.
    Working in the unsupported and dangerous world you chose, the font
    size for text conversion is set (and this is very bad design from
    Adobe) in the settings for Create PDF > From Web Page. There is no API
    to this.
    Aandi Inston

  • How to add text in .ai file and  set position, font, size and colour

    I want to place multiple lines of of text (individually) into .ai file and set size, font, colour and position for each.
    Preferably text should have origin in a single point (rather than be framed)
    Hope anyone can help me out.
    Thank you in advance.

    Here's what's in the Scripting Reference
    Creating and modifying text frames
    // Creates a document with text frames displaying path, area and point
    // text, changes the content of each frame then deletes the 2nd frame
    // create a new document
    var docRef = documents.add();
    // create 3 new textFrames (area, line, point)
    // Area Text
    var rectRef = docRef.pathItems.rectangle(700, 50, 100, 100);
    var areaTextRef = docRef.textFrames.areaText(rectRef);
    areaTextRef.contents = "TextFrame #1";
    areaTextRef.selected = true;
    // Line Text
    var lineRef = docRef.pathItems.add();
    lineRef.setEntirePath( Array(Array(200, 700), Array(300, 550) ) );
    var pathTextRef = docRef.textFrames.pathText(lineRef);
    pathTextRef.contents = "TextFrame #2";
    pathTextRef.selected = true;
    // Point Text
    var pointTextRef = docRef.textFrames.add();
    pointTextRef.contents = "TextFrame #3";
    pointTextRef.top = 700;
    pointTextRef.left = 400;
    pointTextRef.selected = true;
    redraw();
    // count the TextFrames
    var iCount = docRef.textFrames.length;
    var sText = "There are " + iCount + " TextFrames.\r"
    sText += "Changing contents of each TextFrame.";
    // change the content of each
    docRef.textFrames[0].contents = "Area TextFrame.";
    docRef.textFrames[1].contents = "Path TextFrame.";
    docRef.textFrames[2].contents = "Point TextFrame.";
    redraw();
    docRef.textFrames[1].remove();
    redraw();
    // count again
    var iCount = docRef.textFrames.length;
    Your are looking stuff with the pointTextRef.

  • How to set different pointsize  (Font Size) for different text range in the single textframe.

    I have a one textframe in which i want to  set three different pointsize(font size) for three different text ranges. I have set different tag name for different text ranges . So How can I set different pointsize in the single texmframe.
    Please reply me if anyone is aware of it.
    Thanks,

    Jack,
    Extending Martti's post, you can create an XSLT that will add an element around the ASD2.1 part when you import the XML file into FrameMaker. Then FrameMaker's EDD can format this added element with a font different from the one used in the content element.
    Van

  • How does photoshop position fonts in paragraph text boxes?

    I am trying to understand how photoshop places the baseline in a paragraph box.
    I have a number of custom fonts, when typing in a paragraph text box some of these fonts appear to cross over the bounding box of the paragraph text.
    I've looked at the font dimensions, ascender, descender, baseline and x-height and cannot find a common theme that photoshop appears to use.
    Its starting to make my head hurt, so please if anybody knows what calculations photoshop uses to place fonts please let me know!
    Thanks
    Jon

    InDesign is best for larger amounts of text like full paragraphs, but I use PS all the time for text in ads where text is fairly minimal but infinite visual placement is critical. Then I find staying in PS most convenient. Once you learn the (IMO non-intuitive) text formatting controls, infinite adjustment and placement is possible.
    Text boxes in PS, however, are IMO problematic regardless of font. If one must use PS rather than InD, when possible it is best to simply type text and format using returns, etc.

  • Is there a way to permanently set a font in pages?

    The default font in pages is Helvetica.  Every time I start a new document, I have to change it to Times New Roman.  Is there a way to permanently set the font as Times New Roman so that I do not have to do it every time.  Thanks.

    You need to create your own default template. Open the blank template & set up your document with the line spacing, margins, headers, etc. as you'd like. Redefine all of the paragraph & character styles to have your desired font. You can set default wrap for any object as well as many other settings. Insert a table, click in it & choose the font, size, color, etc. you want in the fonts panel or format bar. You can do similar changes to inserted objects & text boxes. While you're at it resize the box if you want, set the amount of extra space in the wrap inspector, etc. Delete each text box, object & table after you've set them.
    Now, save this document as a template & select that template as default in preferences. If you decide to make any changes to the template down the road, just Save As Template again with the same name & replace the previous version. All of your new documents will have these settings for inserted objects, images & tables. Unfortunately, the settings won't apply to any other templates or "foreign" documents you open with Pages.

  • How do I set the opacity/transparency of a text box

    Hello,
    I am trying to make a simple applescript to make a "FPO" which will be transparent at 50%
    tell application "Adobe InDesign CC 2014"
      tell active document
      set FPOimage to make text frame with properties {geometric bounds:{".25", ".25", "1.5", "4.2"}}
      set contents of FPOimage to "FPO"
      tell paragraph 1 of FPOimage
      tell paragraphs to set justification to center align
      set point size to 125
      set applied font to "Arial Black"
      set font style of paragraph 1 to "Regular"
      end tell
      tell text frame preferences of FPOimage
      set vertical justification to center align
      set opacity to 50
      end tell
      end tell
    end tell
    BUT ITS NOT WORKING...help?

    I figured it out...
      tell FPOimage
      tell transparency settings
      set properties of blending settings to {blend mode:normal, opacity:40.0}
      end tell
      end tell
    thank god for the internet, i do hope this helps anyone else looking to do the same thing. Next challenge is to make a dialog box so that the user can put any text in it and color they want.
    - Cheers!

  • Font attributes of a text element in a smartform

    Hi Folks,
    I have a text element in a smartform for whic I am using a Smartstyle to set the font size,style etc.
    In the text editor I have it like this-
    k1 Net Quantity:&itab-quantity&.
    k1 is the paragraph format I had declared in the smartstyle with fontsize 14.
    Net Quantity is hardcoded in the text editor.
    Now I want to set a different font size  only to the &itab-quantity&.How to achieve this.
    Thanks,
    K.Kiran.

    Hi Folks,
    Got the Solution,We can do it by declaring a character format with a different font size.
    k1 Net Quantity: <c1>&itab-maktx&</>
    c1 is the new character format with a font size that applied only to maktx if given the above way in the text editor.
    Thanks,
    K.Kiran.

  • Change the font color of a text field in a table by key-combination

    I want to change the font color of a text field in a table (single cell only) on pressing a key combination. Does anybody know how to do this.
    I have a lot of data in a table. During an evaluation of the data in a meeting I want to change the color of the text depending on the result of the meeting. (for example: High risk = CTRL+R makes the text red).
    I know how to change the color using a button, but I do not want to add a button after each cell. For this reason I would like to do it on a key combination that alway refers to the active cell.
    Many thanks for your help in advance.
    Marcel

    Hi,
    I don't think you can use the ctrl key like that as those shortcuts will be intercepted by Reader (ctrl-R toggles the ruler display on / off).  You also might have trouble updating the color while you still have focus on it.  You can use the shift key in a similar way, so if you only have lower case characters in the text fields then you can do something like;
    if (xfa.event.shift)
        switch (xfa.event.change)
            case "R":
                this.fontColor = "255,0,0";
                break;
            case "O":
                this.fontColor = "255,102,0";
                break;
            case "G":
                this.fontColor = "0,255,0";
                break;
        xfa.event.change = ""; // ignore character
    If you need uppercase characters maybe you can have one button to set "review mode" and test that on the if (xfa.event.shift) line.  But again it wont take effect until you have tabbed out of the field.
    Regards
    Bruce

  • Print Module - Set Explicit Font Sizes

    In the Print Module Identity Plate can Lightroom set font size explicitly instead of using only a % scale factor?
    The scale factor is a great idea but it would be a lot more convenient at times to set the font size explicitly to 10 or 12 or whatever so it could carry over to other titles if you want all your titles to print in a specific font size (e.g. 12 points). That's already possible with Vibrance, Recovery and a host of other settings (including the Identity Plate scale factor itself!) and it's very valuable to be able to have those exacting controls.
    Thanks,
    Robert

    Ian,
    I'd be very pleased if I'm doing something wrong. From what I see the Identity Plate supports only one font size, and only for the most recent photo. When I choose Edit and type in a new title of a different length Lightroom changes the size of the font (the longer the title, the smaller the font and vice versa). Try this:
    1) Open Identity Plate and title the picture "Hello".
    2) Change the title to "I just love Adobe Lightroom so very much!"
    The title will be smaller. Lightroom seems to disregard the Identity Plate font size.
    I just tried your recommendation and no matter how I changed the Identity Plate font size in the Print module (e.g. from 38pt to 8pt) the photo's title text size barely changes, I have to use the Scaling slider every time. That font sizing functionality only works for me in the Library module when I'm creating my actual Identity Plate.
    Every time I change pictures I have to re-do this step. The way I'm dealing with this is changing the scaling factor (or with your recommendation, the font size) every time for every different-length title and/or enlarging/shrinking the title box for each photo.
    As I explained in my other reply to your other post, this is very time-consuming when you're printing 50-100 titled photos in a single day/weekend (not to mention the fact that it's physically impossible to set every scaling factor so all titles print exactly the same size font).
    It would be a lot better for Lightroom to automatically save all the print parameters the way it saves all other of the picture's metadata.
    If you could share an easy way to make that much faster I'd be quite grateful.
    Robert

  • How can I set the font size of a form field in the fdf file?

    I need to dynamically set the font size of a field to accommodate text of varying length, automatic font size won't work in this case. It seems like this can be done in the FDF but I have tried several variants without success. Could someone help out with a real example of what the syntax in the fdf should look like.
    I am using Acrobat Professional 8.1 but the created fdf will need to work with Reader also.

    I think that the font size has to be set in the form itself, not the FDF.

  • Formatting issues: when I open a msg, the font is sooo small you need a magnifier to read it. How can I set the font size to one I can easily read?

    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    I have various formatting issues:
    a. When I open a msg from my web browser (Cablevision), the font is sooo small I need a magnifier to read it. How can I set the font to a size I can easily read?
    b. When I forward msgs, the text gets all distorted and I need to clean it up (some symbols, lots of spaces between words). How can this be fixed?
    c. When I want to tell someone about a website, I cannot type the URL in so that all they have to do is click on it. How can this be fixed?
    d. When I open messages, the text opens in a small window and covers the "Show Images" button. Why?
    == This happened
    ==
    Every time Firefox opened
    == Ever since I started using Firefox (a few months ago)
    ==
    '''Troubleshooting information'''
    I didn't find any results
    == Firefox version
    ==
    3.6.3
    == Operating system
    ==
    Windows 7
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
    == Plugins installed
    ==
    *-nphpclipbook
    *Office Plugin for Netscape Navigator
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
    *Default Plug-in
    *Adobe PDF Plug-In For Firefox and Netscape "9.3.2"
    *NPRuntime Script Plug-in Library for Java(TM) Deploy
    *The Hulu Desktop Plugin allows Hulu.com to integrate with the Hulu Desktop application.
    *Shockwave Flash 10.0 r45
    *Adobe Shockwave for Director Netscape plug-in, version 11.5
    *iTunes Detector Plug-in
    *3.0.40624.0
    *NPWLPG
    *Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers

    The text editor is the text area that you use on the webmail (Yahoo, Hotmail) website to create a new mail.
    You can compare that with the ''Post new message'' text area that you use to create a new post on this forum.
    Just above the text area that you use to enter the message text there is usually a button bar with buttons that allows some text formatting like Bold and Italic and can also include a button to make a clickable hyperlink.
    Check the tooltip of each button by hovering with the mouse over each button.
    Make Link - https://addons.mozilla.org/firefox/addon/142

Maybe you are looking for