ghostscript using X11 : wrong characters | Uniface 9 | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

—  Results per page  —








— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters
For a group of consecutive words like 'end of support' use Match phrase

sp_Feed Topic RSS sp_TopicIcon
ghostscript using X11 : wrong characters
21 Oct 2015
9:11 am
Avatar
TheAleph
Member
Forum Posts: 54
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi all,

I work on U9.4; according to the doc about the ghostscript configuration I’ve used driver X11.

In the generated pdf some fonts (eg  Calibri, Arial Narrow etc…)  are switched in Courier …..

suggestions or solutions ?

Thanks, Roberto

21 Oct 2015
9:36 am
Avatar
diseli
Admin
Forum Posts: 820
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

TheAleph said
Hi all,

I work on U9.4; according to the doc about the ghostscript configuration I’ve used driver X11.

In the generated pdf some fonts (eg  Calibri, Arial Narrow etc…)  are switched in Courier …..

suggestions or solutions ?

Thanks, Roberto

Hi Roberto,

When printing to PostScript (using the Printer Device Table P_X11) Uniface will use the fonts provided in the \common\afm directory of the Uniface APS installation (a basic set of Adobe Font Metric files; *.afm). In case a font is used for printing that is not present in the \common\afm directory then it’s substituted with a “similar” AFM font.

In case you would like to use the mentioned fonts for printing then you either can try to obtain the corresponding AFM files (if they exist and you might need to buy them); or you could use a Windows PDF printer (like e.g. PDFCreator, 7-PDF Printer, CutePDF, …) and print from Uniface using the P_MSWINX printer device table.

Hope this helps.

Kind regards,
Daniel

21 Oct 2015
11:27 am
Avatar
gypsilon
Member
Forum Posts: 74
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi Roberto,

I’ve got a similar problem.

Daniel is right in using the *.afm.

I don’t know X11, we just printed via a windows pdf-Printer.

Here, set within the printer definitions of the pdf-printer:

True Type Font: “Substitute with Device Font” to “Download as Softfont”

In our case this did help. The pdf will get a bit larger, because the Fontdefinitions are stored within the pdf.

Hope this helps

Wolfgang

21 Oct 2015
1:05 pm
Avatar
gianni
Member
Forum Posts: 257
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi Roberto,

I am supposing you are using P_X11 driver to print with Uniface on a Linux platform different from MS-Windows, probably ReadHat (and derivative) or Suse Linux. After printing to a file as Postscript format your idea was to use Ghostscript to convert the file to PDF. Am I right?

If YES, on a Linux platform managing fonts originated from Windows is not available by default because being Linux up2now based on X11 those Windows fonts are considered an option.

To have those fonts properly rendered into your PDF on Linux you need to install additional packages from Linux repo. Take a look at:

– For RedHat and derivative: http://www.sysarchitects.com/i…..-step-step

– For Suse: https://forums.opensuse.org/showthread.php/479256-how-to-use-windows-fonts

Hope this will help you.

Ciao,
Gianni

P.S. Working in these Linux environment to print PS->PDF like you probably want to do we’ve found a small Uniface bug about EditBox and italian accented characters. If you will experience it in your language you need to migrate to 9.6.06 as minimum because it was solved working with ULabs in february 2015; as an alternative you could use UniField in your printing functionalities.

21 Oct 2015
1:14 pm
Avatar
TheAleph
Member
Forum Posts: 54
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Thanks Daniel & Wolfgang,

we need to create and attach to email, or store the pdf file, without show or ask

operations to users (as ghost file), and without having a local printer to install and configure ….

so ghostscript (installed on server) and this way using X_P11  seems to be perfect; we are already using

local printers like PdfCreator but this isn’t 

we also:

–  try to compile used fonts in afm format and put into .afm dir, but no way.

–  try to use P_MSWINX instead P_X11, and fails

–  P_X11 is more than 10 years old (?) no upgrades ?

I’m confused.

bye

21 Oct 2015
1:18 pm
Avatar
TheAleph
Member
Forum Posts: 54
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Grazie Gianni,

come puoi vedere dalla risposta precedente, non è per una problematica unix e, da quello che posso

vedere, anche migrando a 9.6 (cosa che stiamo pianificando) non dovrebbe risolvere.

Ciao

21 Oct 2015
3:15 pm
Avatar
gianni
Member
Forum Posts: 257
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Roberto,

In a way or another it’s a common solution…let’s talk about your pre-requisites!

If you like drop me an email: gianni.sandigliano@unifacesolutions.com

Gianni

21 Oct 2015
3:44 pm
Avatar
diseli
Admin
Forum Posts: 820
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

TheAleph said
Thanks Daniel & Wolfgang,

we need to create and attach to email, or store the pdf file, without show or ask

operations to users (as ghost file), and without having a local printer to install and configure ….

so ghostscript (installed on server) and this way using X_P11  seems to be perfect; we are already using

local printers like PdfCreator but this isn’t 

we also:

–  try to compile used fonts in afm format and put into .afm dir, but no way.

–  try to use P_MSWINX instead P_X11, and fails

–  P_X11 is more than 10 years old (?) no upgrades ?

I’m confused.

bye

I did a quick test here and the following seems to work:

  • Downloaded and installed the font editor FontForge
  • Converted the TrueType font ArialNarrow (%SystemRoot%\Fonts\ARIALN.TTF) to a “PS Type 1 (Ascii)” font using FontForge (File > Generate Fonts)
  • Copied the generated .pfa and .afm files to {UnifaceInstallDir}\common\afm
  • Added a mapping for ArialNarrow to the [screen], [printer], and [postscript] section of the INI file (the important thing is the mapping in [postscript]); e.g.

[screen]
ArialNarrow10=ArialNarrow, 10, regular

[printer]
ArialNarrow10=ArialNarrow, 10, regular

[postscript]
ArialNarrow10=ArialNarrow, 10, regular

  • Create a small test form with an EditBox field that is using the logical font ArialNarrow10
  • Test the form, enter some data, and then print using P_X11

The result is a PostScript file that shows the text with ArialNarrow.

Please note that “enhanced” PostScript printing will only work with the Printer Device Table (PDT) P_X11. The PDT P_MSWINX can only be used in combination with the Windows Print Manager (Print Queue in the Print Job Model must be set to PRINTMAN).

Hope this helps.

Daniel

22 Oct 2015
7:41 am
Avatar
diseli
Admin
Forum Posts: 820
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

It probably is needless to say that you need to check if the license of a specific font allows you to convert it into another format. For the fonts shipped with Microsoft Windows this clearly is not the case (Microsoft Typography FAQ: Font redistribution and license issues). So if you would like to use a specific font in PostScript then it’s best to contact the original foundry and ask them where you could obtain the required font files.

22 Oct 2015
4:01 pm
Avatar
TheAleph
Member
Forum Posts: 54
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Thanks to Gianni and Daniel for your answers and suggestions.

I try, but the problem is still alive…….. may be i’m going to migrate  U9.6.07 (last patch)  and retry.

Bye

19 Apr 2017
8:51 am
Avatar
Claudio
Italy
Member
Forum Posts: 90
Member Since:
05 Jun 2016
sp_UserOfflineSmall Offline

Hello Roberto,
if I can…how have you solved the problem?

Thanks in advance
Claudio

19 Apr 2017
6:25 pm
Avatar
TheAleph
Member
Forum Posts: 54
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline
not yet solved, I keep you informed about
ciao
20 Apr 2017
3:47 pm
Avatar
Claudio
Italy
Member
Forum Posts: 90
Member Since:
05 Jun 2016
sp_UserOfflineSmall Offline

TheAleph said

not yet solved, I keep you informed about
ciao

  

Grazie,
troppo gentile.
Se hai piacere, mi piacerebbe condividere i risultati dei miei test.

Thanks,
you are very kind.
If you like, I’d like to share the results of my tests.

Claudio

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 131

Currently Online:
6 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ulrich-merkel: 1694

Iain Sharp: 612

Theo Neeskens: 339

gianni: 257

rogerw: 232

istiller: 199

lalitpct: 197

Knut: 175

-GHAN-: 171

sochaz: 165

Member Stats:

Guest Posters: 3

Members: 6286

Moderators: 0

Admins: 8

Forum Stats:

Groups: 1

Forums: 62

Topics: 2032

Posts: 8749

Newest Members:

Androrimquife, adbotter, KennethHub, MathewBew, Sarma, RichardSmare, Frostseekerquife, Lookeephi, Llberyquife, BrunoTop

Administrators: admin: 23, Adrian Gosbell: 278, diseli: 820, Bob Maier: 3, Nico Peereboom: 62, Michael Rabone: 4, richiet: 406, JanCees: 28