font customized to replace d with degree symbol

Has anyone created a font where the letter d is replaced with a degree symbol. I would find this useful for labeling the angle (bearing) of a line using Surveyor's Units. Use case. I define a block attribute and populate with a field. The field is connected with a line object and displays the Angle property in Surveyor's Units. The font assigned to the block attribute would be this customized font. Advantage. No special knowledge or coding skills required. Please correct me if I misunderstand how the Angle property is rendered using these settings.

Comments

  • In text a %%D results in degree symbol, you can also go into extended characters, Mtext has these already as well as dia, m2 and so on.

    Just click on the @ symbol in mtext.

  • Thank you for your response ALANH. Let me take it a bit further.

    "The field is connected with the line object and displays the Angle property.."

    Displaying an Angle property creates a condition where you cannot edit the text. Editing text is exactly what I am trying to avoid for productivity reasons. Exploding just to edit text defeats the purpose of using a Field.

    N 89°18'56" E when switched to using Symbols as a font displays as shown in the image.

    Degrees symbol looks good. The quadrants (N,S,E,W) look good. The minutes and seconds are unusable in this format. Having a Font that substitutes ° for d is all I need.

  • Sorry, I had the wrong screen capture. Symbol font used in this example does not display °.

  • OP, it should be easy to make the font that you're looking for. Start with an existing font file, copy the glyph for the degree symbol, paste it into the glyph for the upper- and/or lower-case letter D, and then save it under a different name. There are lots of freeware font editors.

  • Thanks Anthony. I got as far as creating a .sfd file using FontForge. Could not figure out how to make a .ttf from that.

  • I've never heard of SFD files, but I see that there are a lot of free online SFD to TTF converters. And those sites say that SFD is only used by FontForge. Maybe the other free font editors save directly to TTF?

  • Can you post a sample dwg please, I am lucky we don't need the N & E in AUS. I think I understand the problem got 21d12'8" as a result.

    This was a reply in 2014 by Anonymous

    "Doesn't look like it can be done directly with fields,but if you had the fortitude to do it in a formula field you would have to start withh decimal parse each piece and format"

    The formula field method may be the only way to get it to work. Convert decimal degrees to Dwg/min/sec. Have the answer in a lisp not a formula. Will have a think about it.

    This is a compatibility bug which should have been fixed by Bricscad & Autocad. Perhaps log a support request.

  • Hello.

    Regarding the FontForge approach.

    You could use File > Generate Fonts ... to generate fonts - ttf for instance - from the sfd file.
    Choose TrueType from the drop-down on the left.

    Something important would be to change the new font name before generating it.
    This is to avoing generating a conflict with the original font.
    Use Element > Font Info ... to change the names, Fontname, Family Name, and Name For Humans.

  • Thanks to Virgil, ALANH, and Anthony. Virgil pointed me in the right direction. Using FontForge > Element > Font Info I replaced the Family name and Font name so it would not replace anything in existence with installed fonts. I used File > Generate Fonts to produce a ttf with a unique name. I did a Rclick > Install on the ttf. The custom font folder containing the .ttf just created was added to the support file path in BCAD. To test in BCAD I changed the saved Font for Standard style using the drop down list. The screen capture below shows the Bearing displaying ° instead of d. To integrate this new ttf for use in labeling I'll update my dwt with a dedicated text style just for using these types of labels. Thanks for your help in keeping me at it like a dog with a bone.

  • The issue with using the font is when you send the dwg to someone it will not recognize the font, you need to use etransmit.

    I started to look at a field formula that would convert a decimal angle to ddd mm sec. The example is the formula in lisp.

    (setq ang 44.97520611)

    (setq ddd (fix ang))
    (setq min (* (- ang ddd) 60.0))
    (setq sec (* (- min (fix min)) 60.0))
    (setq min (fix min))

    (setq str (strcat "N " (rtos ddd 2 0) "°" (rtos min 2 0) "'" (rtos sec 2 0) (chr 34) " E"))

  • Anthony Apostolaros
    edited October 9

    quote: The issue with using the font is when you send the dwg to someone it will not recognize the font….

    Won't the recipient's CAD program just substitute a similar font? That font will show a D instead of the degrees symbol, but maybe that won't bother the recipient as much. If it does, they can pursue a solution in the same dogged way that CADontheBrain did.

  • @ALANH I thought of the missing font issue with recipients of the dwg using a custom font. Thanks for bringing that issue up.

    @Anthony Apostolaros fontalt will typically use simplex.shx in place of the missing font. That puts us back to the beginning condition. Sharing the custom Font is a requirement to keep the recipient's experience as intended.

    The best solution in my example would be to use an expression in a Field to convert the display to the desired format. A numeric expression is what ALANH is suggesting. Another approach would treat the Angle as a string and just replace the d with °. <back to chewing on the bone>.

  • The only problem with replace d is that the question was to use a Field, not sure if a field can have a replace character as part of the field formula.

    I will time permitting try to do the formula for dddmmss

  • @ALANH I did not find any string manipulation features in expressions for Fields. On a different tangent I submitted a feature request with support SR 184295 "Fields > Surveyor's units: add a setting/variable/option to replace "d" with a degree symbol in drawing area, unlike AutoCAD"