Font substitution

Good day, I was wondering if anyone has an easy way to substitute multiple fonts? We recently had to change from Win7 to Win10 and lost many of the fonts I used to use that are referenced in many of my older drawings, making plotting a bit of a mess. Amy suggestions please?

Comments

  • You can do this using a font mapping file. The default one included with BricsCAD is called "default.fmp" and you will find it your user support folder. Looks like this

    ; default.fmp: font mapping file
    ; .............................................................................
    ;
    ; Use a font map file to control font substitution.
    ; Each line in this file should consist of a pair of font names separated by a semicolon.
    ; The first name indicates the font to be substituted (name is without extension),
    ; the second name indicates the replacement font (including the extension).
    ;
    ; Comment/uncomment any of the following lines to desactivate/activate substitution
    ;
    ic-comp;complex.shx
    ic-complex;complex.shx
    ic-gdt;gdt.shx
    ic-ital;italic.shx
    ic-italc;italicc.shx
    ic-italic;italic.shx
    ic-italicc;italicc.shx
    ic-italict;italict.shx
    ic-italt;italict.shx
    ic-mono;monotxt.shx
    ic-monotxt;monotxt.shx
    ic-romanc;romanc.shx
    ic-romand;romand.shx
    ic-romans;romans.shx
    ic-romant;romant.shx
    ic-romnc;romanc.shx
    ic-romnd;romand.shx
    ic-romns;romans.shx
    ic-romnt;romant.shx
    ic-txt;txt.shx
    isocp2.shx;isocp.shx
    isocp3.shx;isocp.shx
    isoct.shx;isocp.shx
    isoct2.shx;isocp.shx
    isoct3.shx;isocp.shx
    visiotc;trad_chin.shx
    visiohg;hangul.shx
    visiojp;japanese.shx
    msimplex;simplex.shx
    
    ; obsolete postscript fonts ( .PFB)
    CIBT____;CITYB___.TTF
    COBT____;COUNB___.TTF
    EUR_____;EURR____.TTF
    EURO____;EURRO___.TTF
    PAR_____;PANROMAN.TTF
    ROM_____;ROMANTIC.TTF
    ROMB____;ROMAB___.TTF
    ROMI____;ROMAI___.TTF
    SAS_____;SANSS___.TTF
    SASB____;SANSSB__.TTF
    SASBO___;SANSSBO_.TTF
    SASO____;SANSSO__.TTF
    SUF_____;SUPEF___.TTF
    TE______;TECHNIC_.TTF
    TEB_____;TECHB___.TTF
    TEL_____;TECHL___.TTF
    

    The font mapping file used is governed by FONTMAP in SETTINGS

    Regards,
    Jason Bourhill
    CAD Concepts

  • Thank you Jason for your response, however, I tried that with no luck. The problem seems to be that at sometime the FONT was changed in the Text Editor so it is not linked to the style anymore. The specific font is Swis 721 LtCn BT. I tried adding that font to the Substitution List, with no change to the drawing.

    oh, also, the MatchProp does not have any affect on the FONT in this case, it only changes the STYLE.

    Might you have any other suggestions.

  • @Roy Klein Gebbinck said:
    Try StripMtext.

    Thank you, looks like that may work, now if I can only load it "Failed to initialize VBA" error. Looking for a solution to that now.

    Thanks again.

  • Which version of Bricscad do you have? VBA does not work with the Classic version.

    https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/unformatting-mtext/td-p/844377 has a function named @unformat.lsp which was used as the basis of StripMtext. It may or may not do everything you need.

    An alternate approach would be to explode the mtext. That creates a TEXT entity with no embedded formatting.

  • StripMtext works fine on BC Classic. No VBA is involved. But the code does interface with a VBScript RegExp object. Maybe IT has blocked that?

  • @rmatcfec:
    I have just tested the font mapping solution as suggested by Jason. This also works for fonts that have been applied as mtext formatting. Although these substitutions are not echoed in the Command Bar.

    Two things may lead to confusion:

    1. BricsCAD looks for the .fmp file in the search path. The default location is the Support folder in the 'Roamable root prefix' folder. You should not change the file in the UserDataCache folder.
    2. The file is loaded once per session. So after any changes you must restart BricsCAD for them to take effect.
  • Thanks all; once I told it to auto load, it worked fine... And a special thank you to Roy Klein Gebbinck the Lisp routine did the trick!!

    Also just an FYI I use Version 18.2.20 64bit on Windows 10

  • You can do this using a font mapping file. The default one included with BricsCAD is called "default.fmp" and you will find it your user support folder. Looks like this

    ; default.fmp: font mapping file
    ; .............................................................................
    ;
    ; Use a font map file to control font substitution.
    ; Each line in this file should consist of a pair of font names separated by a semicolon.
    ; The first name indicates the font to be substituted (name is without extension),
    ; the second name indicates the replacement font (including the extension).
    ;
    ; Comment/uncomment any of the following lines to desactivate/activate substitution
    ;
    ic-comp;complex.shx
    ic-complex;complex.shx
    ic-gdt;gdt.shx
    ic-ital;italic.shx
    ic-italc;italicc.shx
    ic-italic;italic.shx
    ic-italicc;italicc.shx
    ic-italict;italict.shx
    ic-italt;italict.shx
    ic-mono;monotxt.shx
    ic-monotxt;monotxt.shx
    ic-romanc;romanc.shx
    ic-romand;romand.shx
    ic-romans;romans.shx
    ic-romant;romant.shx
    ic-romnc;romanc.shx
    ic-romnd;romand.shx
    ic-romns;romans.shx
    ic-romnt;romant.shx
    ic-txt;txt.shx
    isocp2.shx;isocp.shx
    isocp3.shx;isocp.shx
    isoct.shx;isocp.shx
    isoct2.shx;isocp.shx
    isoct3.shx;isocp.shx
    visiotc;trad_chin.shx
    visiohg;hangul.shx
    visiojp;japanese.shx
    msimplex;simplex.shx

    ; obsolete postscript fonts ( .PFB)
    CIBT____;CITYB___.TTF
    COBT____;COUNB___.TTF
    EUR_____;EURR____.TTF
    EURO____;EURRO___.TTF
    PAR_____;PANROMAN.TTF
    ROM_____;ROMANTIC.TTF
    ROMB____;ROMAB___.TTF
    ROMI____;ROMAI___.TTF
    SAS_____;SANSS___.TTF
    SASB____;SANSSB__.TTF
    SASBO___;SANSSBO_.TTF
    SASO____;SANSSO__.TTF
    SUF_____;SUPEF___.TTF
    TE______;TECHNIC_.TTF
    TEB_____;TECHB___.TTF
    TEL_____;TECHL___.TTF

    The font mapping file used is governed by FONTMAP in SETTINGS

    Regards,

    Jason Bourhill
    CAD Concepts

    I am having problem, where the font is in the list, but it does not load. it load the alternative font instead. the font already in the font folder. how do i re-correcting the font loading?




    example,
    in my case, there are several font where saved font is romans.shx and found font is romans.shx
    and there are also, in the same file, saved font is romans.shx and found font is simplex.shx (substituted dont know why)
    and there are also, in the same files, saved font is isocp2.shx and found font is isocp.shx (subtitute may be because of default.fmp.
    can see picture.

    so how do we control the substitution of the font?
    as i look into the default.fmp, some font were state there, but not loaded properly.
    also how to resubstituted the text style?
    i already try edit the list on default.fmp file with other font, but still the same. not loaded.. it still load the same.. restart pc also try, result still same..


  • You can copy a TTF from one computer to another, so if you have the win8 and a usb you may be in luck. Need to copy the TTF to \windows\fonts it should say ttf xxxx installed.