home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / f / finalwriter / finalwriterv5.04ukver.lha / FinalWriter_B / FWMacros / TxtStyle_Bold < prev    next >
Text File  |  1993-10-25  |  1KB  |  42 lines

  1. /* ========================================= */
  2. /* Final Writer Arexx Macro - TO BOLD        */
  3. /* Set the font at the insertion point to    */
  4. /* Bold. Note that this will only work for   */
  5. /* fonts whose styled names start with '_'   */
  6. /* (the underscore character) such as        */
  7. /* X X_Italic, X_Bold, X_BoldItalic.         */
  8. /* $VER: TxtStyle_Bold 3.0 (22.7.93)         */
  9. /* ========================================= */
  10. Options Results
  11.  
  12. /* ------------------------------ */
  13. /* Get the complete font pathname */
  14. /* ------------------------------ */
  15. Status FontPath
  16. fontpath = Result
  17.  
  18. /* ------------------------------------- */
  19. /* Get only the font filename (w/o path) */
  20. /* ------------------------------------- */
  21. Status FontName
  22. fontname = Result
  23.  
  24. /* -------------------------------- */
  25. /* Does the file name have an '_'   */
  26. /* This will signify if the font is */
  27. /* normal or styled.                */
  28. /* -------------------------------- */
  29. pos = LASTPOS('_', fontname)
  30. IF (pos == 0) THEN
  31.    DO
  32.    fontpath = fontpath || '_Bold'
  33.    END
  34. ELSE DO
  35.    pos = LASTPOS('_', fontpath)
  36.    fontpath = DELSTR(fontpath, pos)
  37.    fontpath = fontpath || '_Bold'
  38.    END
  39.  
  40. Font fontpath
  41.  
  42.