Skip to main content
DebralynnMedDev
Inspiring
May 9, 2023
Answered

Baseline shift

  • May 9, 2023
  • 3 replies
  • 1499 views

Is there a way to change the baseline for a character in FrameMaker? I prefer to do this in my trademark statement. In InDesign I'd create a character style for the ® and have it 2 pts larger with a baseline shift of -2 so it wouldn't be so high. Also, with smaller copy, it is essential to make it larger than the font size so we don't end up with the R looking like a black dot when the ink spreads.

    This topic has been closed for replies.
    Correct answer K.Daube

    If you need this often, you may set up a MIF snippet (as Bob told):

    <MIFFile 7.00> # character format shift_up_50%
    # save as shift_up_50%.mif
      <FontCatalog 
        <Font 
          <FTag `shift_up_50%'>
          <FDY  -50%>
          <FLocked No>
        > # end of Font
      > # end of FontCatalog
    > # End of MIF

    You need to find out the percentage...

    • Having saved the snipped as shift_up_50%.mif,
    • Open it in your FM - it will create a new empty document with the appropriate character format in the catalogue.
    • Import the character format from this new file into your current one
    • Use the character format shift_up_50%

    3 replies

    frameexpert
    Community Expert
    Community Expert
    May 10, 2023

    Here is a way to do it with ExtendScript so you avoid the MIF route. This should give you the equivalent of Klaus's solution:

    #target framemaker
    
    main ();
    
    function main () {
    
        var doc;
        
        doc = app.ActiveDoc;
        if (doc.ObjectValid () === 1) {
            processDoc (doc);
        }
    }
    
    function processDoc (doc) {
        
        var charFmt, PT = 65536;
        
        // See if the character format exists.
        charFmt = doc.GetNamedCharFmt ("shift_up_50%");
        if (charFmt.ObjectValid () === 0) {
            // Create the character format.
            charFmt = doc.NewNamedCharFmt ("shift_up_50%");
        }
        
        charFmt.UseKernY = 1;
        charFmt.KernY = -.5 * PT;
    }
    DebralynnMedDev
    Inspiring
    May 10, 2023

    Thanks! I'm not familiar with ExtendScript either, but will keep all of these so that when I'm up-to-speed, I can come back and implement all the tips.

    frameexpert
    Community Expert
    Community Expert
    May 10, 2023

    Here are the general steps to use my script: First, copy the text and paste it into a plain text file and save it with a .jsx file extension; for example, SetBaselineShiftFormat.jsx. Then launch FrameMaker and open your document. Choose File > Script > Run and select the script that you saved.

     

    Your new Character Format will appear in the Character Catalog, ready to use. Note that you can play with the value in the script to get the desired offset. This is the line you would modify:

        charFmt.KernY = -.5 * PT;

    It looks like .5 corresponds to 50% and 1 corresponds to 100% so you can these as a guide. Negative numbers shift the characters up and positive numbers shift them down.

     

    Note that you can leave the script open in a text editor as you make changes. Save the changes and rerun the script. You won't see the changes to characters that already have the Character Format applied unless you choose File > Import > Formats and use these settings:

    K.Daube
    Community Expert
    K.DaubeCommunity ExpertCorrect answer
    Community Expert
    May 10, 2023

    If you need this often, you may set up a MIF snippet (as Bob told):

    <MIFFile 7.00> # character format shift_up_50%
    # save as shift_up_50%.mif
      <FontCatalog 
        <Font 
          <FTag `shift_up_50%'>
          <FDY  -50%>
          <FLocked No>
        > # end of Font
      > # end of FontCatalog
    > # End of MIF

    You need to find out the percentage...

    • Having saved the snipped as shift_up_50%.mif,
    • Open it in your FM - it will create a new empty document with the appropriate character format in the catalogue.
    • Import the character format from this new file into your current one
    • Use the character format shift_up_50%
    DebralynnMedDev
    Inspiring
    May 10, 2023

    Thanks! When I have some time, I'll be looking into MIF. I am not familiar with it atm. 

    Bob_Niland
    Community Expert
    Community Expert
    May 10, 2023

    re: I'll be looking into MIF. I am not familiar with it atm.

    Maker Interchange Format, usually saved as .mif
    MIF is FM .fm and .book file data structures in human-readable markup form.

    It's main use is for saving a project authored in a newer version of FM so that it can be opened in any older version of FM. But it can also be used for hacks, tweaks, generating FM with an external app, or just debugging/learning.

    Bob_Niland
    Community Expert
    Community Expert
    May 10, 2023

    Baselines for characters can be adjusted in FM, using keystrokes Alt⇩ and Alt⇧

    In the MIF, this sets markup tag ‹FDY ##.##%›, but I don't see any way to declare that in Character Designer, nor, so far, preserve it for Variable use. It looks like it's an override-only situation.

    There might be some Text Inset or Xref hacks that would allow you to define it once, then use it anywhere.

    There are certainly hacks involving importing it as a small at-insertion-point Anchored Frame as an SVG or EPS object.

    Personally, I'd be tempted to just find a visually similar font that already had an ® with suitable metrics.

     

    Keep in mind that any use of Character Formats, in items gathered for lists (e.g. ToC, Index), will break the hypertext link at that point in the string.

    DebralynnMedDev
    Inspiring
    May 10, 2023

    Thank you for this! I'll have to look up MIF. Although I've used Adobe programs for decades, I've only been using FrameMaker for about six months but I'm really liking the features. Even though I've only scratched the surface, I'm looking forward to realizing all the capabilities.