Get numeric values of word spacing displayed?

while there are two ways to influence the word spacing (by setting the minimum, desired, and maximum values in the Justification settings, and by using the keyboard short cut increasing or decreasing word spacing), I cannot find where the resulting word spaces are displayed as numeric values. Since kerning values are easily looked into, I presume there must be a way to have the word spacing values displayed, too. But how?

It's not a known item in Javascript -- it would need to be a private property of the Line class, as each single line has its own word spacing adjustment.
But using two javascripts you can find out how much the space on each line is stretched or compressed.
First, you need to know the width of a regular space in the font and size (and other parameters as well, such as tracking and horizontal scaling!). Select one single space in Left Aligned text and run this script:
alert ( app.selection[0].insertionPoints[1].horizontalOffset - app.selection[0].insertionPoints[0].horizontalOffset);
It will show a popup with a ridiculous exact number. Myriad Pro at 8 pts, for example, gives "0.59828389485676". Now press Ctrl+C to copy this text (I'm not sure if the Mac can do this as well!). Go to another script and paste just the number in there:
regularWordSpace = 0.59828389485676;
alert ( 100*(app.selection[0].insertionPoints[1].horizontalOffset - app.selection[0].insertionPoints[0].horizontalOffset)/regularWordSpace);
If you select any justified space (again, using the same font, size, tracking, whatnot), it'll display a fairly reliable percentage, yeah, unto the seventh generation of exactitude and more.

Similar Messages

  • Get numerical values from 2D array of string

    Hello! 
    I start by saying that I have a base knowledge of LabView. I'm using LabView 2011. I'm doing some communications test via Can-Bus protocol. As you can see in pictures of the block diagram and of the front panel that I've attached I'm using "Transmit Receive same Port" LabView example. It works very good but I would need to insert the 8 data bytes that I receive from the server in 8 different numerical variables so that I could use them to make some operations. How can I get numerical values from the 2D array of string that I attached? 
    Every example that you can provide is important! 
    Thank you very much! 
    Attachments:
    1.jpg ‏69 KB
    2.jpg ‏149 KB

    Hi martiflix,
    ehm: to unbundle data from a cluster I would use the function Unbundle(ByName)…
    When you are new to LabVIEW you should take all the FREE online resources offered by NI on their website!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Numeric value in words (for Cheque printing)

    Hi All,
    To convert numeric value in words (for Cheque printing), I created two functions in Forms and reports 6i.
    1) FUNCTION Spell (val number) RETURN CHAR IS
    sp varchar2(100);
    BEGIN
    if val > 0 then
         return(initcap(to_char(to_date(val, 'SSSSS'), 'SSSSSSP')));
    else
         return('');
    end if;
    END;
    2) function SPELLED_AMOUNTFormula return Char is
    cents number;
    c_str varchar2(80);
    val number;
    begin
    val := :p_instr_amt;
    cents := (val mod 1) * 100;
    if cents > 0 then --creates string for cents
    c_str := ' and ' || spell(TO_CHAR(cents)) || ' fils Only';
    else
    c_str := ' Only';
    end if;
    if val < 1000 and val > 1 then
    return (initcap(spell(floor(val))) || c_str);
    elsif val > 1000 then
    return(initcap(spell(floor(val/1000))) || ' Thousand ' ||
    spell(floor(val mod 1000)) || c_str);
    else
    return('Zero'||c_str);
    end if;
    end;
    This convert value up to thousands. How to convert the value more than 1 lac. please configure this code.
    Thanks in advance

    Hi,
    To spell integers as high as 5,373,484, use 'Jsp' instead of 'ssssssp'.
    TO_CHAR ( TO_DATE ( n     -- n = integer to be spelled
                  , 'J'
         , 'Jsp'          -- Case-sensitive
         )5373484 is the Julian date of December 31, 9999, the latest DATE value in Oracle. In Oracle 10.2, you can actually spell numbers a little bit higher using the expression above, but I'm not sure why, and I wouldn't count on being able to do so in future versions.
    There's no need for INITCAP here. If the 2nd argument to TO_CHAR is initcapped (as above), then the output will be, too.
    To spell even larger numbers, see this page by Tom Kyte, which also includes languages other than English, and lakh-crore-arab-kharab wording.
    Edited by: Frank Kulash on Oct 13, 2012 7:21 AM

  • Htmlb:get the values from bean n display it in textView

    Hi,
    I am doing one PDK application using jspdyn page. In jsp page I am using htmlb to display the table. In that I am using one text view element. There I need to get the values from bean class.And display it in a table.
    Can anyone help me how can use the textView inside htmlb to retrieve the values from bean.
    Thanks & Regards
    Vineela

    hi vineela,
    For the textView, in the text value write the code  <%=myBean.getStr()%>
    where myBean will be your bean class and getStr() is the method in the bean class whcih returns value which needs to be displayed on the screen.
    Thanks
    Harsimran

  • How to get numeric values

    I need to filter out certain numeric values from a column.
    The column has mix values of 1, 02, MA, sentences, A, 500.00,
    2059678974, 006702.
    I used IsNumeric() to filter out non-numeric values like A or
    sntences, MA, etc. But I also need to filter out 1, 2 and 3 digits
    numbers and floating typed number (234.00 or 324,345)
    Can anyone tell me what function can I use to get a pure 4 to
    6 digits number?

    A much better way to do this is:
    <CFIF REFind ("^[0-9]{4,6}$", yourString)>
    <!--- It's good. --->
    <CFELSE>
    <!--- It's bad. --->
    </CFIF>
    However, the BEST way is to select these columns right in the
    query.
    Most RDBM's can easily do this. Syntax depends on which RDBMS
    you are using.

  • In formula column - I am getting current year - but get numeric value error

    Hello
    I defined a formula column as folllows:
    function CF_1Formula return char is
    thisyear char;
    begin
         select to_char(sysdate,'YYYY')
         into thisyear
         from dual;
         return thisyear;
    end;
    I get - Fatal Pl/Sql error. numeric or value error. What am I doing wrong here?

    Or replace the whole thing with
    RETURN to_char(sysdate,'YYYY');
    saving a pointless round trip to the database.

  • How to get subtotal value in ALV list display

    Hi all,
    How to give condition on the value of subtotal line in ALV list display,
    i.e.if value of subtotal of plan quantity = actual quantity (in red oval) it should show the message
    'ON TIME DELIVERY' else it should not show messagee.In my case(shown in red oval) its
    showing for each subtotal value. I know how to change the subtotal text but i want to change
    with respect to value of the subtotal.(plz refer attachment)
    Any input regard to this will be achieved great.
    Many thanks in advance.
    samadhan shinde.

    Hi Samadhan,
    I am awaiting for solution for this problem.....but as i think dynamically displaying sub total based on
    matching actual quantity and planned quantity is bit complicated.
    My idea is to display matched quantities in one block and unmatched  quantities in another. I mean using blocked list.
    awaiting suggestions.
    regards,

  • How to represent numerical values in words?

    I have a report for purchase order where in the order value to be reprented in words.Hope someone can give me the right method of doing it.
    Thanks
    Jay

    Hi,
    Please refer Re: Installation requires too many services to stop I think the given link has code for both - a function as well as a procedure - should solve your problem
    Thanks,
    Puvan.

  • How to get numerical value for every button

    Hi,
    Currently I am using a case structure to determine which graph i want to display. For example, each case( i have 7 cases), there is a frequency,amplitude dial which user can change it. So basically there are 7 of those. Let say the user want to change case 1 and display those. I've plan to place a button PLAY beside the frequency dial so that it will activate the case 1. But the problem is how can i do that as the input for the case structure is numerical (0-6) to select the case. How can i activate case 1 for an example, when i click the button PLAY beside the first dial? Is it possible to change the configuration of the button PLAY, so that when its activated, it will give out numeric 1 and i wire to the case structure input? Thanks guys.

    Maybe you want to use a single radiobutton control with seven items?
    Here's a quick example.
    (Also, see what happens if you wire the radiobutton control to a case structure. )
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    SelectWithRadio.vi ‏22 KB

  • How to get Date value from database and display them in a drop down list?

    Hello.
    In my Customers table, I have a column with Date data type. I want to create a form in JSP, where visitors can filter Customers list by year and month.
    All I know is this piece of SQL that is convert the date to the dd-mm-yyyy format:
    SELECT TO_CHAR(reg_date,'dd-mm-yyyy') from CustomersAny ideas of how this filtering possible? In my effort not to sound like a newbie wanting to be spoonfed, you can provide me link to external notes and resources, I'll really appreciate it.
    Thanks,
    Rightbrainer.

    Hi
    What part is your biggest problem?? I am not experienced in getting data out of a database, but the way to get a variable amount of data to show in a drop down menu, i have just messed around with for some time and heres how i solved it... In my app, what i needed was, a initial empty drop down list, and then using input from a text-field, users could add elements to a Vector that was passed to a JComboBox. Heres how.
    package jcombobox;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Vector;
    import javax.swing.*;
    public class Main extends JApplet implements ActionListener {
        private Vector<SomeClass> list = new Vector<SomeClass>();
        private JComboBox dropDownList = new JComboBox(list);
        private JButton addButton = new JButton("add");
        private JButton remove = new JButton("remove");
        private JTextField input = new JTextField(10);
        private JPanel buttons = new JPanel();
        public Main() {
            addButton.addActionListener(this);
            remove.addActionListener(this);
            input.addActionListener(this);
            buttons.setLayout(new FlowLayout());
            buttons.add(addButton);
            buttons.add(remove);
            add(dropDownList, "North");
            add(input, "Center");
            add(buttons, "South");
        public void actionPerformed(ActionEvent e) {
            if (e.getSource() == addButton) {
                list.addElement(new SomeClass(input.getText()));
                input.setText("");
            } else if (e.getSource() == remove) {
                int selected = dropDownList.getSelectedIndex();
                dropDownList.removeItemAt(selected);
        public void init(String[] args) {
            setSize(400,300);
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(new Main());
    }And that "SomeClass" is show here
    package jcombobox;
    public class SomeClass {
        private String text;
        public SomeClass(String input) {
            text = input;
        public String toString() {
            return text;
    }One of the things i struggled a lot with was to get the dropdown menu to show some usefull result. If the list just contains class references it will show the memory code that points to that class. Thats where the toString cones in handy. But it took me some time to figure that one out, a laugh here is welcome as it should have been obvious :-)
    When the app is as simple as this one, using a <String> vector would have been easier, but this is just to demonstrate how to place classes in a vector and get some usefull info out of it, hope this answered some of your question :-)
    The layout might have been easier to write, than using the toppanel created by the JApplet and then the two additional JPanels, but it was just a small app brewed together in 15 minutes. Please comments on my faults, so that i can learn of it.
    If you need any of the code specified more, please let me know. Ill be glad to,

  • How can I get HyperTrend to display the numeric value output of a CHOOSE statement?

    I have non-linear values I need to display on a HyperTrend graph.  I'm currently converting the input raw signal to a Units (Engineering) value and then looking up the actual value (from a calibration chart) using a CHOOSE statement in order to display the actual value on a panel, but I need to display the values output by the CHOOSE statement on a HyperTrend graph, along with other similar values.
    How can I do this?

    I have non-linear values I need to display on a HyperTrend graph.  I'm currently converting the input raw signal to a Units (Engineering) value and then looking up the actual value (from a calibration chart) using a CHOOSE statement in order to display the actual value on a panel, but I need to display the values output by the CHOOSE statement on a HyperTrend graph, along with other similar values.
    How can I do this?

  • Convert numeric value to display as text based on record in another table? ASP/VB

    I have an orders table:
    orderID (PK)
    pickupname
    pickupaddress
    pickupregion (numeric)
    pickuppostcode
    deliveryname
    deliveryaddress
    deliveryregion (numeric)
    deliverypostcode
    I also have a regions table:
    regionID
    regionname
    On my ASP page, I would like to display the pickup and
    delivery addresses as
    follows, but also need this to be within a repeat region as I
    am displaying
    a number of orders on the page (I have wrapped what I want in
    the repeat
    region in dashes, below):
    ---------Repeat Region Start-----------
    Pickup Address:
    Name
    Address
    Region (pickupregion)
    Postcode
    Delivery Address:
    Name
    Address
    Region (deliveryregion)
    Postcode
    --------Repeat Region End------------
    As it displays at the moment, I get this (using sample data):
    ---------Repeat Region Start-----------
    Pickup Address:
    Joe Bloggs
    High Street
    12
    HT12 5TY
    Delivery Address:
    Jane Bloggs
    The Mall
    33
    DT6 5TG
    --------Repeat Region End------------
    Is there any way to convert these numeric values to the
    actual region name
    but to keep it within one recordset so that I can use the
    repeat region? I
    tried creating a recordset for regions (SELECT regionID,
    regionname FROM
    tblRegions WHERE regionID = pickupregion OR regionID =
    deliveryregion), but,
    because I'm not repeating this region, it just displays the
    same regional
    name for every order, albeit the first record returned does
    contain the
    correct values! :o)
    I was thinking about some kind of inner join, but it's having
    two numeric
    region fields in the orders table that is causing me
    headaches! PS. I need
    to keep the two addresses within one orders table - I had
    thought of that!
    Got me a bit stumped, I have to say. Any help would be
    greatly appreciated.
    Thanks.
    Regards
    Nath.

    I've tried this one already.
    I tried to leave it blank, & nbsp ; , text,... but the problem is that our lov is build by a function and it always returns a query, so the LOV is never null.
    I figured something out: made a process after header that has some cursors to get the values from the database and changed the item to a simple display as text-field. There were only 4 that were wrong, so it wasn't to much work.

  • Report results displays only (*), no numeric values.

    Dear all,
    The report result only displays asterick (*), no numeric values. But the field in the result thus has numbers which can be seen in display at the top in the excel sheet. why?
    Do i need to make any changes in Query properties or something else??
    Please advise.

    Hi,
    You should be trying to work to different units of measure or different currency. If you do any calculation with two values which has different unit then the result will be so.
    use NODIM() of the keyfigure and do the calculation. create a formula and add NODIM to keyfigure, then you should be able to see values but you will not get the unit along with value.
    Else you should go for conversion of units to single one and then you can get both values and units.
    Hope this helps
    Regards
    Akhan

  • How do you convert numeric values into english words?

    I am interested in creating a field in adobe acrobat that references a total dollar amount field. I want the java script to convert the numeric number into a written word, such as $59.59 as Fifty Nine and 59/100. I have no experience writing java script code and would really like some help on how this can get done. Its also important to embed in the programming that if their is no numeric value to reference, then nothing get referenced. This means an empty text box. Thanks for any help.

    Im using the below script...... I'm a complete novice at this and helping a friend out with it.
    Any info is appreciated.
    aTens = [ "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"];
    aOnes = [ "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine",
      "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen",
      "Nineteen" ];
    function ConvertToHundreds(num)
       var cNum, nNum;
       var cWords = "";
       num %= 1000;
       if (num > 99) {
          /* Hundreds. */
          cNum = String(num);
          nNum = Number(cNum.charAt(0));
          cWords += aOnes[nNum] + " Hundred";
          num %= 100;
          if (num > 0)
             cWords += " and "
       if (num > 19) {
          /* Tens. */
          cNum = String(num);
          nNum = Number(cNum.charAt(0));
          cWords += aTens[nNum - 2];
          num %= 10;
          if (num > 0)
             cWords += "-";
       if (num > 0) {
          /* Ones and teens. */
          nNum = Math.floor(num);
          cWords += aOnes[nNum];
       return cWords;
    function ConvertToWords(num)
       var aUnits = [ "Thousand", "Million", "Billion", "Trillion", "Quadrillion" ];
       var cWords = (num >= 1 && num < 2) ? "Dollar and " : "Dollars and ";
       var nLeft = Math.floor(num);
       for (var i = 0; nLeft > 0; i++) {
           if (nLeft % 1000 > 0) {
              if (i != 0)
                 cWords = ConvertToHundreds(nLeft) + " " + aUnits[i - 1] + " " + cWords;
              else
                 cWords = ConvertToHundreds(nLeft) + " " + cWords;
           nLeft = Math.floor(nLeft / 1000);
       num = Math.round(num * 100) % 100;
       if (num > 0)
          cWords += ConvertToHundreds(num) + " Cents";
       else
          cWords += "Zero Cents";
       return cWords;
    You can use the following script for the custom calculation for the words field when the number field is named "Number":
    event.value = "";
    var f = this.getField("Number");
    if(f.valueAsString != "") {
    event.value = ConvertToWords(f.value);

  • How do I get my XML numeric values to show up when loaded into flash?

    Hi there,
    I've created an AS2 3D carousel  It loads text values in the "content" section of the code below -  including numbers and special characters into the .swf but...
    What I can't figure out, is how to get it so that the "Tooltip" loads the text into the movieclip, but can also have numeric and special characters in it.
    For example, I need the title of one of the icons on this carousel to be "3D Images," but only the "D Images" shows up from the XML text for the tooltip.  The content when a user clicks on the icon can include numbers, just not the titles for some reason.
    http://iongeo.com/collaboration_test_dev/video_arctic_imaging.html
    I think it has something to do with the way that my text is loaded from the xml document specifically for the tooltip and tipText for the movie clip.  Can numeric values be loaded into a movie clip in AS2?  PLEASE HELP!
    import mx.utils.Delegate;
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    var numOfItems:Number;
    var radiusX:Number = 300;
    var radiusY:Number = 75;
    var centerX:Number = Stage.width / 2;
    var centerY:Number = Stage.height / 2;
    var speed:Number = 0.05;
    var perspective:Number = 130;
    var home:MovieClip = this;
    theText._alpha = 0;
    theHeader._alpha = 0;
    var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
    tooltip._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = function()
        var nodes = this.firstChild.childNodes;
        numOfItems = nodes.length;
        for(var i=0;i<numOfItems;i++)
            var t = home.attachMovie("item","item"+i,i+1);
            t.angle = i * ((Math.PI*2)/numOfItems);
            t.onEnterFrame = mover;
            t.toolText = nodes[i].attributes.tooltip;
            t.content = nodes[i].attributes.content;
            t.header = nodes[i].attributes.header;
            t.icon.inner.loadMovie(nodes[i].attributes.image);
            t.r.inner.loadMovie(nodes[i].attributes.image);
            t.icon.onRollOver = over;
            t.icon.onRollOut = out;
            t.icon.onRelease = released;
    function over()
        //BONUS Section
        home.tooltip.tipText.text = this._parent.toolText;
        home.tooltip._x = this._parent._x;
        home.tooltip._y = this._parent._y - this._parent._height/2;
        home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
        home.tooltip._alpha = 100;
    function out()
        delete home.tooltip.onEnterFrame;
        home.tooltip._alpha = 0;
    function released()
        //BONUS Section
        home.tooltip._alpha = 100;
        for(var i=0;i<numOfItems;i++)
            var t:MovieClip = home["item"+i];
            t.xPos = t._x;
            t.yPos = t._y;
            t.theScale = t._xscale;
            delete t.icon.onRollOver;
            delete t.icon.onRollOut;
            delete t.icon.onRelease;
            delete t.onEnterFrame;
            if(t != this._parent)
                var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
                var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
                var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
            else
                var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
                var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
                var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,150,1,true);
                var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,250,1,true);
                var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
                var tw5:Tween = new Tween(theHeader,"_alpha",Strong.easeOut,0,100,1,true);
                theText.text = t.content;
                theHeader.header = t.header;
                var s:Object = this;
                tw.onMotionStopped = function()
                    s.onRelease = unReleased;
    function unReleased()
        //BONUS Section
        var sou:Sound = new Sound();
        sou.attachSound("sdown");
        sou.start();
        delete this.onRelease;
        var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
        var tw:Tween = new Tween(theHeader,"_alpha",Strong.easeOut,100,0,0.5,true);
        for(var i=0;i<numOfItems;i++)
            var t:MovieClip = home["item"+i];
            if(t != this._parent)
                var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
                var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
                var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
            else
                var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
                var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
                var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
                var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
                tw.onMotionStopped = function()
                    for(var i=0;i<numOfItems;i++)
                        var t:MovieClip = home["item"+i];
                        t.icon.onRollOver = Delegate.create(t.icon,over);
                        t.icon.onRollOut = Delegate.create(t.icon,out);
                        t.icon.onRelease = Delegate.create(t.icon,released);
                        t.onEnterFrame = mover;
    function moveTip()
        home.tooltip._x = this._parent._x;
        home.tooltip._y = this._parent._y - this._parent._height/2;
    xml.load("icons.xml");
    function mover()
        this._x = Math.cos(this.angle) * radiusX + centerX;
        this._y = Math.sin(this.angle) * radiusY + centerY;
        var s = (this._y - perspective) /(centerY+radiusY-perspective);
        this._xscale = this._yscale = s*100;
        this.angle += this._parent.speed;
        this.swapDepths(Math.round(this._xscale) + 100);
    this.onMouseMove = function()
        speed = (this._xmouse-centerX)/8000;

    Kglad, you are my HERO!
    Thanks so much for your reply, I did not know about the embed options within flash...
    Mike

Maybe you are looking for