How to find the typeface of a TrueType font for PCL5 file generation? - printing

I am trying to embed truetype font Treubuchet MS in a PCL5 generating program.
But I've stumbled on a problem. To embed and use the the font I should know its typeface, when selecting it for use in the *.pcl file. But I can't find a reference, where fonts and their typefaces(numbers) are described.
To be more precise, I am using the below sequence for selecting Treubuchet MS regular:
esc(s0S esc(s0B esc(s25513T esc(6982X
Explanation:
not italic, not bold, typeface of font, id of font to be loaded to printer.
But my currently selected typeface (25513) is wrong and the font is not sent and loaded to the printer (soft font added in the file).
Could you help me with this?

As far as I can see, the font ID you need is the one supplied when you created, and downloaded, the soft font.
Note that on page 189 of the PCL 5 reference (section 11-5 Soft Font Creation, in case you have a different version of the spec) it says:
Use the Font ID command to designate a unique ID number prior to the
download of a font header. If an existing font is already associated
with this ID, the existing font is deleted upon the download of the
font header.
The Font ID command can be found on p156 of my copy of the spec:
The Font ID command is used to specify an ID number for use in
subsequent font management commands. The ID number of a font can be
used to select the font for printing (refer to “Font Selection by ID”
in Chapter 8). E C *c#D
# = ID number Default = 0 Range = 0 - 32767 The font ID number is used during subsequent soft font downloads, selections or deletions. The
factory default font ID is 0 (if no Font ID command is sent, an ID of
0 is assigned).
So before you download the soft font you should specify the font ID of the font, eg:
esc*c1D
Then download the font. When you want to use the font you downloaded then you select it with:
esc(1X
Still not a PostScript question though :-)

Related

Specify Pango markup font (node ImageMagick)

I have a set of local fonts that I'd like to apply on my text in PangoML.
AFAIK the way to specify fonts is through the font family attribute in the span element. But where/how can I specify a path to the otf file containing the fonts I'd like to use?
I've also tried setting the font through imagemagick, but then it seems to apply the font to multiple texts.
graphicsMagick(900, 150, "#FCF6EA")
.font(`${__dirname}/static/fonts/Graphik-SemiBold.otf`, 1)
.fontSize(52)
.out('-background', '#FCF6EA')
.out('-size', '890x', 'pango:TOPTEXT_WITH_FIRST_FONT'
.out('-gravity', 'NorthWest', '-geometry', '+10+10')
.out('-compose', 'atop')
.out('-size', '850x', 'pango:BOTTOMTEXT_WITH_DIFFERENT_FONT')
.out('-gravity', 'SouthWest', '-geometry', '+30+10')
.out('-compose', 'atop')
.out('-composite')

How to set font in Texinfo

I'm using the GNU texinfo package to generate both PDF and .info files from a .texi file.
I'm trying to update an old .texi file (not changed since 2001) and generate the same PDF output. I've resolved a number of issues, but there are a couple outstanding. In the old PDF, the title was in Helvetica and body text is Liberation Serif. In the new PDF, both are Computer Modern.
I've read everything that I can find about fonts, but I'm not able to change the fonts. Nothing that I do seems to work. Everything I have tried generates errors.
In my .texi file, before any \setfont directives, I have \def\fontprefix{uh} which, if I read the pdftex.map file correctly, should select the NimbusSanL font set (e.g. uhvr8a.pfb). I get the following errors:
mktexnam: Could not map source abbreviation for uhss10.
kpathsea: Running mktexmf uhss10
! I can't find file uhss10'.
<*> ...ljfour; mag:=1; ; nonstopmode; input uhss10`
Does anyone have a example .texi file which sets the font family to use? Or an explanation of what I'm doing wrong?

Zebra ZQ520 printer, download and use new .CPF font with ZPL language

problems to print with different fonts on my Zebra ZQ520:
as described in documentation, I've downloaded some new font through the official Zebra Font Downloader program, comic and verdana. After this, I found the new fonts in E: storage area. So the script:
^XA^HWE:^XZ
give me:
LIST OF FONT LINKS
- DIR E:.
* E:COMIC_02.CPF 7359
* E:VERDAN02.CPF 163 ....
- 66589184 bytes free E: ONBOARD FLASH
and trying to print example string from font downloader program, it print with the installed font with success.
The problem appens if I try to print a label. The printer seems not consider the .CPF files in ZPL commands.
My tests, without success, are:
1) following the procedure indicated in https://km.zebra.com/kb/index?page=content&id=SO7891 , assigning a designator to new font, with the script:
^XA^CWQ,E:COMIC_02.CPF^XZ
and trying to print something as:
^XA^FO50,50^AQN,50,50^FDSAMPLE CoMiC^FS ^XZ
seems not working (is it not possible to assign a designator on .CPF files??)
2) (not working too) test, I tryed to print something with the ^A# command, also without success. Example:
^XA^FO50,50^A#N,50,50,E:COMIC_02.CPF^FDSAMPLE CoMiC^FS ^XZ
Where is the problem? with printer (updated with the last firmware, V76.19.15Z)?
or ZPL can't print font stored in .CPF files?
or ..??
thanks!
The ZQ500 supports multiple printing languages. It ships with the PnP string stating that it is a CPCL printer. This tells the Zebra Setup Utility to generate a CPCL compatible font (.CPF). Since you are looking to print using ZPL you need to generate a font compatible with ZPL.
https://km.zebra.com/resources/sites/ZEBRA/content/live/SOLUTIONS/8000/SO8535/en_US/ZebraNet_Bridge_Font_Converting.pdf
This will use a different program to package a .ttf font for the printer. ZPL has support for truetype fonts so you will have better scaling of the font.
The ^CW and ^A# commands will both work with the ttf font.

HTML2FO always uses Arial font in BI Publisher

I'm trying to do a HTML conversion in my report(RTF) and it works but expected output change my font 'Times New Roman' to Arial. I believe, I changed my default font to Times New Roman even in xdo.config but still HTML2FO makes it Arial.
Other sections of the document has Times New Roman.
XML:
<TEST><p><b><i>This is a test paragraph</b></i>. This is without bold
and italic</p><p><b><i>This is another test paragraph</b></i>. This is
without bold and italic</p><TEST>
BIP Code:
<?HTML2FO:TEST?>
Could anyone please help me in getting this right?
Thanks!
I am having the same problem too. The way I got around this is to change the XML output:
<TEST><div style="font-family:Calibri;font-size:10px;"><p><b><i>This is a test paragraph</b></i>. This is without bold
and italic</p><p><b><i>This is another test paragraph</b></i>. This is
without bold and italic</p></div><TEST>

How to custom alignment in Sublime Text 2?

Well I'm using Sublime Text 2 for a lot of tasks, included the creation of documents with LaTeX. I downloaded and installed the alignmentpackage and works great when I want to align respect the = symbol. But in LaTeX I need to align also with respect to & and sometimes % but I don't understand where or how can I custom that. I read the documentation about that package here, and now I see I must go to Preferences > Package Settings > Alignment > Settings – User but there the only I see is:
{
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme",
"font_size": 12.0,
"ignored_packages":
[
"Vintage",
"PyV8"
]
}
And I don't know what exactly should I add, and if it's before close the {} o later opening a new pair. Could someone help me with that?
On my mac you would need to look at Alignment/Base File.sublime-settings
// The mid-line characters to align in a multi-line selection, changing
// this to an empty array will disable mid-line alignment
"alignment_chars": ["="],
Add the characters you want to align on either to this file, or create a user settings file as you indicated.
"alignment_chars": ["=", "%", "&"],
The contents of the file you listed is actually your user system preferences, not the user settings file for Alignment.

Resources