Since version 6.6 we have changed the technologies that we are using for printing, and have replaced the farmerswife PDF creation with a built-in printer, where before you would print using your computer installed PDF printer.
This change could affect the reports and PDFs that you generate from farmerswife, once upgrading to a version higher than 6.6
Issues that you can experience are:
- Selected font is not displayed correctly in the report print designer preview
- The printed PDF has the wrong fonts
- You get an empty PDF and a PS file
- Exported PDF shows only the first page of a multi-page PDF
The solution is to use the new "Scan Fonts" functionality. Hopefully this fixes all problems, ie that you get the correct font both in the report print designer and on the printed PDF. If this however only fixes the first point and you still get the wrong fonts on your printed PDF, the solution is to add a csv file to your server system folder.
IMPORTANT: The font format to use in your fonts library should be True Type format (.ttf file extension).
This article describes how to do this.
Please Note: If your templates have background images, you may also want to check the image caching settings here: Image Caching in Print Designer for "empty PDFs"
Scan Fonts
Reports can be generated both on your farmerswife desktop client and on the server. Server-side printing happens when you use functionalities to attach a PDF to emails sent from farmerswife, or when sharing reports to the Web client and iOS. Font scanning is therefore important both for the farmerswife client and on the Server. The absolute first step is of course to check that you have the font installed on your computer, and on the server machine for server-side printing.
The “Scan Fonts” functionality allows farmerswife to correctly read the fonts you have installed on your client or server machine. In most cases, default system fonts will work without a scan, but if you have installed special fonts, farmerswife might not be able to use these until you run the scan.
Font scanning on the
Server: On server initialisation, after an upgrade or the nightly scheduled server restart, there will be an automatic font scanning, if there has previously not been a fully completed font scan process on the server. It is also possible to run a server font scan via the Toolbox in the desktop client.
Client: The first time you run a report, you will get prompted to scan fonts. If you select not to, you can later do it from the Toolbox. Font scanning is a one time process for each user.
N.B. if a user logs into the desktop app using a different machine, they may need to run a new font scan again on this secondary machine.
Font scanning when generating a PDF
In the process of generating your first PDF after upgrading to 6.6 SP1 or later, you will get a popup asking you to run a font scan. If you select "Skip Scan For Now" and you then realise that you need to scan your fonts, you can do it later from the Toolbox.
Font scanning from the Toolbox
In Toolbox > Settings > Miscellaneous > click on the "Scan Fonts" button
If you have the User Permission "Server Setup" you will be able to start a font scan for the Server. You can select Cancel or Confirm. After clicking on cancel or confirm a second popup shows where you can select to start a Client-side font scanning. The scanning process takes less than a minute.
When this process is done, your fonts should be displaying correctly in your report template.
If fonts do not print correctly on the printed PDF - use a fontmap.csv to map the fonts
It can happen that even if all looks good in the Print Designer preview, your printed PDF does not have your selected font. In these cases the default font that will be printed is Arial. To fix this you can add a fontmap.csv file to the server system folder, this is a one time process. Please contact [email protected] for help. If you want to give it a go yourselves please see the description on how this works below.
If you host the farmerswife server you will need the help of the system admin / person that maintains your farmerswife server. If your server is cloud hosted contact [email protected].
Creating the fontmap.csv
In the fontmap.csv you will need one line for headers and one line for the font you are mapping.
The structure of the fontmap.csv consists of the font name and 4x positions delimited by a comma:
fontmap line 1 > Font name,Regular suffix,Italic suffix,Bold suffix,BoldItalic suffix
fontmap line 2 > The post script name of the fonts and the corresponding suffixes (ie for regular, italic etc)
(A fontmap.csv is attached to the article
Each position represents the font styles Regular, Italic, Bold, BoldItalic. These are the font styles you can set by ticking the corresponding checkboxes in the print designer Edit window.
(If you in previous farmerswife versions had selected various styles in the font selector, you will now only find the font family name, and be able to use the check boxes to create the corresponding font styles.)
Step by step examples
Check the font name in your farmerswife Print Designer
On Mac you can easily find the post script name in the Font Book, (while Windows Font Manager does not show the name - you can find it in your computer*). Open your Mac Font Book application, and locate your font. Click on the Information (i) on the top left to see the details of the font.
Check the "PostScript name" for each style of the font which can be selected in the Print Designer: Regular, Bold, Italic and Bold+Italic
Example: Avenir Next
We are looking for the -suffix in each font style, ie Regular, Italic, Bold and BoldItalic:
For our Avenir Next example the PostScript font name is AvenirNext. This name is added in the position of Font name in the fontmap.csv. This name will be combined with the post script suffixes of the the other styles. So if the Font name is AvenirNext the regular suffix as you will see below is -Regular (including the -). The font is mapped by combining Font name + suffix = AvenirNext-Regular.
Font name: AvenirNext
Regular suffix: -Regular (The PostScript name is AvenirNext-Regular, we therefore need "AvenirNext" in the position of the Font name, and in the position of Regular we add "-Regular", including the "-" this way the font name and suffix are mapped together as AvenirNext-Regular)
Italic suffix: -Italic (PostScript name is AvenirNext-Italic, therefore in the position of Italics we add the suffix "-Italic")
Bold suffix: -Bold (the PostScript name is AvenirNext-Bold, so in the position of Bold we add "-Bold")
Bold Italic suffix: -BoldItalic (The PostScript name is AvenirNext-BoldItalic, so in the position of BoldItalic we add the suffix "-BoldItalic")
The completed fontmap.csv will be
Font name,Regular suffix,Italic suffix,Bold suffix,BoldItalic suffix |
Example: Aller - no suffix for Regular
Take a look at the PostScript name for each position.
The PostScript name for Regular is Aller, ie there is no suffix. The other styles have a suffix to the PostScript name.
As there is no suffix for Regular we will leave the position of Regular in the csv empty.
The fontmap.csv will in this example be
Font name,Regular suffix,Italic suffix,Bold suffix,BoldItalic Suffix |
As you see we have not added anything between the first and second comma.
Add the fontmap.csv to your farmerswife Server
- Quit the server.
- Add the fontmap.csv to your farmerswife server system folder
- Restart the server
- When you reconnect the farmerswife client font should map correctly to your printed PDF. If not please contact Support.
We continuously update farmerswife to natively support non-standard fonts that you report to us.
Attached is a template fontmap.csv
The supported non-standard fonts by default from 6.6 SP2 are listed below. The list below also gives examples of how fontmaps with font name and suffixes can look:
{Avenir} {-Book -Oblique -Heavy -HeavyOblique}
{Avenir Book} {-Book -Oblique -Heavy -HeavyOblique}
{AvenirBook} {-Book -Oblique -Heavy -HeavyOblique}
{Avenir Next} {-Regular -Italic -Bold -BoldItalic}
{AvenirNext} {-Regular -Italic -Bold -BoldItalic}
{DejaVuSans} {"" -Oblique -Bold -BoldOblique}
{DejaVuSansMono} {"" -Oblique -Bold -BoldOblique}
{FreeSans} {"" Oblique Bold BoldOblique}
{FreeSerif} {"" Italic Bold BoldItalic}
{FreeMono} {"" Oblique Bold BoldOblique}
{NotoSans} {-Regular -Italic -Bold -BoldItalic}
{NotoSerif} {-Regular -Italic -Bold -BoldItalic}
{NotoMono} {-Regular "" "" ""}
{UbuntuMono} {-Regular -Italic -Bold -BoldItalic}
{UbuntuCondensed} {-Regular "" "" ""}
{AmericanTypewriter} {"" "" -Bold ""}
{GillSans} {"" -Italic -Bold -BoldItalic}
{Montserrat} {-Regular -Italic -Bold -BoldItalic}
{Roboto} {-Regular -Italic -Bold -BoldItalic}
{DIN Alternate} {"" "" -Bold ""}
{DIN Condensed} {"" "" -Bold ""}
{Effra} {-Regular "" "" ""}
{Aller} {"" -Italic -Bold -BoldItalic}
{Aller Display} {"" "" "" ""}
{Aller Light} {"" Italic "" ""}
{Open Sans} {-Regular -Italic -Bold -BoldItalic}
{PF Handbook Pro} {-Regular -Italic -Bold -BoldItalic}
{TW cen MT} {"" "" -Bold ""}
{MetaPlusLining} {-Regular "" "" ""}
{Arial} {MT "-ItalicMT" "-BoldMT" "-BoldItalicMT"}
{BrandonGrotesque} {-Regular -RegularItalic -Bold -BoldItalic}
{Seed} {-Condensed -Condensed -BoldCondensed -BoldCondensed}
{Seed-Bold} {Condensed Condensed Condensed Condensed}
{RosewoodStd} {"-Regular" "-Regular" "-Regular" "-Regular"}
{AkzidenzGrotesk} {"-Light" "-LightItalic" "-Bold" "-LightItalic"}
{TBDPost} {"-Bold" "-Bold" "-Bold" "-Bold"}
{OpenSans} {-Regular -Italic -Bold -BoldItalic}
{BeausiteClassic} {-Regular -RegularItalic -Bold -BoldItalic}
{GTAmerica} {-Regular -RegularItalic -Bold -BoldItalic}
{Rosewood} {Fill Fill Fill Fill}
{Effra} {-Regular -Italic -Bold -BoldItalic}
{EffraLight} {-Regular -Italic -Regular -Italic}
{EffraHeavy} {-Regular -Italic -Regular -Italic}
{EffraMedium} {-Regular -Italic -Regular -Italic}
{NittiGrotesk} {-Normal -Normal -Bold -Bold}
{Apercu} {-Light -LightItalic -Medium -MediumItalic}
{Sequel100Black} {-45 -46 -55 -56}
{Whitecoat} {"" "" "" ""}
*Paths to find the Fontmap.GS file on your machine
When you run a font scan a file in your Farmerswife folder is created or updated. This file contains the PostScript names. To find the PostScript name, especially on Windows, it can be very helpful to use this Fontmap.GS file. Below are the paths to find this file. Your IT/Systemadmin will know how to find them.
Path to find fw Server side Fontmap.GS on Windows:
C:\Users\Username\AppData\Roaming\Farmers WIFE Server\Fontmap.GS
Path to find fw Client side Fontmap.GS on Windows:
C:\Users\Administrator\AppData\Roaming\Farmers WIFE\Fontmap.GS
Path to find fw Server side Fontmap.GS on Mac (in Finder go to “Go” menu and use “alt/option” keyboard key and choose “Library”; this will result in this path:
/Users/Username/Library/Application Support/Farmers WIFE Server/Fontmap.GS
Path to find fw Client side Fontmap.GS on Mac (in Finder go to “Go” menu and use “alt/option” keyboard key and choose “Library”; this will result in this path:
/Users/Username/Library/Application Support/Farmers WIFE/Fontmap.GS