How can assign fonts TextRange?

It's my code, the TextRange font set

iFont = 119, name of the font = "Tunga."

var oTypedValRp = new TypedVal();

oTypedValRp.valType = Constants.FT_Integer;

oTypedValRp.iVal = iFont;

oDoc.SetTextVal (oTextRange, Constants.FP_FontFamily, oTypedValRp);

But result: = 'Symbol' font name a TextRange

Why? How can assign fonts TextRange?

Hi, here is a code that can set the font of a text range. When run as indicated, it sets the font of the text selected in 'Blackoak Std', if this policy exists on your system. I hope this helps.

Russ


var doc = app.ActiveDoc;
var textRange = doc.TextSelection;
applyFontToTextRange(doc, textRange, "Blackoak Std");

function applyFontToTextRange(doc, textRange, fontName)
{
    if(!doc.ObjectValid())
    {
        alert("Invalid document. Cannot continue.");
        return;
    }

    var fontFamilyNames = app.FontFamilyNames;
    for(var i = 0; i < fontFamilyNames.length; i++)
    {
        if(fontFamilyNames[i] == fontName) break;
    }
    if(i == fontFamilyNames.length)
    {
        alert("Could not find the specified font, " + fontName);
        return;
    }

    props = AllocatePropVals(1);
    props[0].propIdent.num = Constants.FP_FontFamily;
    props[0].propVal.valType = Constants.FT_Integer;
    props[0].propVal.ival = i;   

    doc.SetTextProps(textRange, props);
}

Tags: Adobe FrameMaker

Similar Questions

  • How to assign the different VTEP subnet for each grid of a group pool?

    The design guide NSX to use L3 access design, it is recommended to use the same number VLAN per rack, but with the other subnet

    10.66. < id rack >.0

    10.77. < id rack >.0

    10.88 < id rack >.0

    10.99 < id rack >.0

    If the client compute cluster spread on grids, then we will have a different subnet for each rack VTEP, something like (assuming that vlan 77 is for VTEP0

    < rack 1 > 10.77.1.1, 10.77.1.2, 10.77.1.3...

    < rack 2 > 10.77.2.1, 10.77.2.2, 10.77.2.3...

    During the preparation of the host, GUI invites you to assign VTEP for Pool DHCP/IP, looks like most of the cases we use Pool of IP, then for the compute cluster, how can assign us VTEP IP in a different subnet in a single group?

    Thank you

    Clarisse

    You have two options:

    (1) DHCP using support on every TOR address suggest you. This is the recommended approach

    (2) DHCP then changing manually the VMkernel interface IP address on each ESXi host to match the required subnet - this is not recommended because it is not automatic, but is still supported

  • How can I use the bold/italic characters for embedded fonts (AS2 in CS3)?

    Hey everybody,

    I have a shared file fonts.swf containing a variety of fonts that use my main swf. I have a movieclip in the fonts.swf file that is exported for sharing life. In my main swf file, I have the fonts.swf imported for execution via a movieclip. This works very well and allows me to use the fonts in the fonts.swf file in my main swf. All my text fields are dynamic and created or updated by ACE. I use the following method to style my text boxes (extra code removed for conciseness, it's just so you can see the overall methodology):

    fieldTextFormat = new TextFormat();
    fieldTextFormat.font = "fontid."
    fieldTextFormat.bold = true;

    maintext.styleSheet = myCSS;

    maintext.embedFonts = true;

    mainText.html = true;

    maintext.setTextFormat (fieldTextFormat);

    The problem is that I can't put in bold/italic etc. I can obviously add a version of each font bold/italic in my file fonts.swf without problem, and if I use the relevant identifier so I can get the dynamic text field all in bold. What I can't work is how to assign a font embedded separately as the "BOLD" another version police? So, when I put either. fieldTextFormat.bold = true or use of < b > in the html code, the "BOLD" version appears (and even with the italics).

    I would really appreciate pointers someone can give me one on that I'm not really sure which way to turn, I have searched high and low on the net but can only find references to AS3 and embedding manually each font in a textfield style hidden on stage, I don't want to do what I use a shared font library (unless it is possible to do it via a library of) fonts shared!).

    Thanks a lot for your help.

    Dave

    To use correctly the bold and italic style you need to incorporate a separate policy for each in the library and set the style police in the font properties.

    With the TextFormat all text is placed on a police, it takes so the following then:

    txtExample.htmlText is "I am"BOLD" I'm italic I am by default".

    There is no other way to use the face property make text html to have different text styles in a TextField.

    ("bold" and "italic" are the IDS of binding to the library)

  • How can I add to the selection of the choices of fonts to write an e-mail message.

    The fonts that I have on my computer do not appear in the drop down of available fonts. How can I add the missing fonts?

    Be aware that the e-mail recipients can see the fonts that are installed on their own computers. If you try to use fonts arcane, exotic or non-traditional there are chances that your correspondents will not have them, so use them in your messages are probably unnecessary.

    Can you name all the missing fonts?

  • The font that I tap on the email can be any size I want. But all I get is so small that it is difficult to read. How can I increasse receiving police?

    I switched from Internet Explorer to Firefox to speed up my computer. But now I have a problem with my emails. All I get to very small fonts. As I type, I can use any size I want. How can I fix it?

    You can use an extension to set a page zoom and the size of the default font on the web pages.

    See also:

  • How can I print the addresses of contacts in a font large enough to read?

    How can I print a contact address in OS X El Capitan in a font that is large enough to read?

    WW,

    After selecting 'Print' your printer should offer print size options. Even my old Canon MP 600 has the choice of "Regular/Large. Because these options differ between different models of printers, I can't provide specific parameters.

  • Firefox displays two barely legible as a default fonts fonts. These came from an email that I opened. How can I get rid of them?

    Firefox displays two barely legible as the default fonts fonts. These came from an email that I opened. How can I get rid of them?

    You can write a check for corrupted fonts and duplicate and other police issues:

  • How can I increase the font size on the screen using Windows 7 64 bit

    I have vision problems and find that printing of Web pages is too small. How can I incrase it?

    You can use an extension to set a page zoom and the size of the default font on the web pages.

    It is better to not increase the minimum font size, but use an extension to set the default page zoom to prevent the problems of duplication of text.

  • After updating Firefox, the font on my screen size has been reduced for all applications. How can I increase the size of the font on my screen?

    After the update, the next screen shows all the letters in smaller characters, with fewer pixels. All screens are like that now, and I found nothing in Firefox Help content. It is a problem because I have vision problems. So, how can I increase the font size that had it before? My screen is approximately 20 inches wide.

       Also, any chance I can change all the font to Arial instead of Times New Roman?
    

    Hi shbuzz2001,

    Have you tried to increase the amount of zoom by pressing on CTRL and + a few times? This article will show you how to use the Zoom.

    You can also check out the Knowledge Base article on the accessibility in Firefox - make Firefox and work of content for all users. It deals with default fonts and other options that may interest you.

    Hope this helps!

  • How can I increase the font size of the content in the Firefox browser? We get the older, more it is difficult to see this teeny tiny type. Thank you!

    I want to be able to increase the font size in my Firefox browser, or to be able to zoom in to make it bigger. It is difficult for me to read the fine print that is coming by default. How can I do this? I worked with Firefox on LINUX, and if I remember correctly, I was able to set the size of the font for my browser. I am looking for a way to do the same thing in Firefox for Windows. Thank you.

    If you press (CTRL) and then (+) once you magnify all the window 1 once, twice, then you magnify all windows 2 times (CTRL) and (-) and you can do the opposite.

    check and this one also:

    TOOLS then OPTIONS then CONTENT then FONTS & COLOR session change the DEFAULT FONT SIZE in a bigger. Be sure to click on OK to save the changes.

    Thank you

  • The font size in the page mail g became larger, how can I reduce this return to normal 4 x?

    Screen of G Mail - suddenly expanded to 4 x normal size. Resized images. 4 x larger than normal fonts. How can I return the screen to normal size. I can't find any way of thei PRI.

    Reset the page zoom level it.

    See this:
    https://support.Mozilla.com/en-us/KB/page+zoom

  • How can I change the proportional font in Firefox?

    I prefer the helvetica font, so I changed the fonts for Web pages in the Firefox settings to it (changed all fonts helvetica, unchecked "allow pages to choose their own fonts, instead of my selections above"). However, some Web pages still displayed in what I guess is police seriff under proportional font. It would be nice to get all Web pages to display in the helvetica font, but it seems that firefox allows seriff or without seriff for the proportional font.
    How can I make all display Web pages with the same font: helvetica?
    Please don't tell me how to change other policies; Yet once, I did it.
    I just want to know whether and how the POLICE PROPORTIONNELLE may be changed or disabled, so that all Web pages displayed in helvetica.

    I found it. In fact, the proportional asking you if you prefer without serif or serif. Then, under the present, you can choose what serif is and how modish.

    For example, I wanted my proportional to the police of Mona font. So I put sans serif for proportional representation, and then I changed sans serif for Mona.

  • My yahoo mail page is huge police. How can I get that back to normal font?

    I started using foxfire, but for some reason, when I go to my yahoo mail, the font size is so huge. How can I fix this so the police E-mail returns to normal. It's only happened to my e-mail address and if I open an attachment there large fonts too.

    Please login and click on the button next to the post that solved the problem solved .

    Then, this thread will be searchable for others who have the same problem.

  • What happened to the bar that says 'file, edit' etc.? How can I change the font size to display Hotmail? Where can I access 'Cancel '? Thank you-

    How can I access the toolbar which includes "file, print" etc.? How can I change the font size of my hotmail home page? It used to be using "display".

    In Firefox 3.6 and later Windows, you can hide the menu bar on "view > toolbars" or via the contextual right click menu on a toolbar.
    Press F10 or press and hold the Alt key to bring up the menu bar temporarily.
    Go to "view > toolbars", right click on the menu bar, or press Alt + V T to select to show or hide toolbars (click on an entry to switch from the State).

    See also what happened to the file, edit and view menus? and http://kb.mozillazine.org/Toolbar_customization

  • How can I change the group that is assigned to a contact?

    I synchronize contacts on my 2 iPhones, 2 iPads, MacBook Pro and iMac. I would like to change some of my current designations of the group for some of my contacts. How can I change the group that is assigned to a contact?

    Mark,

    First of all, make sure that you deal with iCloud contacts.

    With the help of your MacBook Pro or iMac Contacts open and remove unwanted contacts outside the group. You will be asked "do you want to remove the card for 'XXX' or delete Group 'YYY'.» Choose "remove group.»

    Then go to "All Contacts" and drag the name of the new group.

    If you want to see what the contact belongs to groups, click on the contact and press 'option '. All groups with this name will be highlighted.

Maybe you are looking for

  • Why only 4 pin tiles when I open a new tab on v.38?

    Right after the update to version 38, my new tab page displays only 4 of 9 tiles PINNED (popular pages) that I had before. By following some instructions here, I just checked the value of "browser.newtabpage.pinned" and all 9 sites are stored. BUT th

  • Satellite 1700-400: maximum size of the HARD drive?

    Hello the hard drive of my 1700-400 has collapsed.Initially, it was a 10 GB HARD drive.What is the maximum size of the 1700-400 can work with? grobi Oxford

  • Edit raw photos to mac files

    I use a Fuji X - T10. Raw files are currently supported by OS X. When I download the pictures, I don't seem to be able to edit raw files. 'Use RAW original title' menu option is grayed out. Can someone explain how to use Photos to directly modify the

  • Different frequencies of signalexpress with oscilloscope

    Hello I'm new to the signal processing. I am facing some difficulties to measure the signal of a sensor of acoustic emission for my project. I use the PXI-6115 module with 1042 q and terminal block is TB2708. I used AI0 and AI1 for main signal and tr

  • We have temporarily blocked your account

    I can't send emails via my e-mail address because I get this error "we noticed unusual activity on your Hotmail account. To protect yourself, you and everyone else, we have temporarily blocked your account"what can I do?