• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Courier New syntax diagram?

Contributor ,
Aug 17, 2020 Aug 17, 2020

Copy link to clipboard

Copied

Today the syntax diagrams in our documents are images. I was thinking if it would be possible to skip the images, and instead use the syntax/box drawings characters from Courier New font instead?

Like:

 

┌─ keyword ─┬►

 

The documentation is published as pdf, html5 and chm.

 

Is the Couried New font pre-installed on all modern Windows/mac/Linux computers?

 

Can this be done, or am I just wasting my time trying to do this?

 

 

Views

214

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 17, 2020 Aug 17, 2020

Copy link to clipboard

Copied

«Is the Couried New font pre-installed on all modern Windows/mac/Linux computers?»

You might need to look into such systems to get this answered.

  • For PDF output this would be no problem, because you can imbed the font
  • For chm I guess, that you can use any font of the Windows system (and chm will not work on Mac or Linux - at least to my knowledge)
  • But for the web output I'm in doubt - or have no clue how to access a font which is not on the system.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 17, 2020 Aug 17, 2020

Copy link to clipboard

Copied

In addition to concerns with whether the client has the {same} font, and whether that font populates all the linedraw codepoints, there's also real concern about vertical alignment from one line of text to the next, not to mention what happens at any page breaks.

If it's easier to create the master art in a well-populated Unicode monospaced font, my inclination would be to do so,
. save the art as PDF
. use a vector editor (such as Illustrator) to convert it to outlines
. save as SVG, and import that

The text-to-SVG part might be automated with an Illustrator Action. I used to do something like this back when EPS was king.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 17, 2020 Aug 17, 2020

Copy link to clipboard

Copied

Haven't done these since BookMaster, where everything was rectangular instead of modernly curvaceous :-} A quick search turns up a small library for generating railroad diagrams, which may be an alternative and might give results amenable to search/copy/paste.

My non-FM environment is very fussy about its .svg, though, and I haven't had occasion to check how forgiving FM is – Illustrator has some unhelpful habits, for instance littering the code with ArialMT when the interface and I hve specified Arial: looks good on screen, but won't render.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

LATEST

Today all our syntax diagrams are done using a custom made font similar to "Courier New". From the editor I produce .png files, which are imported into FrameMaker.

This works, but reason I started to think if we couldn't skip the .png files and instead have the "syntax characters" directly in FrameMaker (and the published documents) is that I would like to have clickable links/cross references between different syntax diagrams.

For example there's a syntax diagram like:

with_query.png

 

 

 

 

 

 

 

Upper case is used for keywords, but lower case is for different "objects" having own syntax diagrams. As you can see there's something called search-clause. If the reader doesn't know its syntax, he has to search for the search-clause syntax to find:

search_clause.png

 

 

 

 

 

 

However, if all syntax diagrams were properly formatted Couried New text instead of .png images, the user could just click search-clause in the first syntax diagram to go to its definition.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines