Code 128 Font doesn't render




14 years ago
8 years ago


(Reporter: dholmes, Unassigned)


1.0 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)



(2 attachments)



14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910

Use this HTML and get the code 128 font from

This source will render in IE.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=Latin-1">
<title>Untitled Document</title>
<style type="text/css">
.style1 {font-family: Code 128}

<span class="style1">ÌasdfÆÎ </span>

Reproducible: Always

Actual Results:  
The text is shown instead of the barcode.

Expected Results:  
Draw the barcode

Comment 1

14 years ago
Created attachment 182102 [details]
sample html that will cause this

The text that should be drawn as a barcode (in the span tag) in the original
description didn't copy and paste well so i am attaching the file
confirmed, same problem in Firefox 1.0.6
tried font-family: "Code 128"; and <font face="code 128"> as well.

The font can be downloaded here :
Component: General → Layout: Fonts and Text
Ever confirmed: true
Product: Mozilla Application Suite → Core
Version: unspecified → 1.0 Branch

Comment 3

10 years ago
Just to be sure, try it with quotes:

 {font-family: 'Code 128';}

Firefox seems to choke on the unquoted font name “MPH 2B Damase”, because it has a text fragment beginning with a number.
I might be wrong, but IIUC in GTK2 a font specification consists of a font name (with embedded spaces if needed) plus one space, plus a font size, e.g. "Bitstream Vera Sans Mono 11". If one of the parts is a number, you might get "Code 128 12" which I suppose could make the GTK2 backend choke. (Don't take my word for this: check it with people in the know.)

Comment 5

10 years ago
Created attachment 362004 [details]
Code 128 ttf 

The "Code 128" version 2.00 works under Fedora : Mozilla/5.0 (X11; U; Linux i686; fr; rv: Gecko/2009020410 Fedora/3.0.6-1.fc9 Firefox/3.0.6

But it doesn't work under windows : Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv: Gecko/2009011913 Firefox/3.0.6

I've attached the font.

The font works just fine using Excel or swriter.
IIUC, the sample tescase is ill-formed HTML. I've always been taught that, according to the standards concerning HTML <font face=...> and CSS "font-family:", a font name SHOULD be quoted if it's anything other than serif, sans-serif, monospace, cursive or fantasy, and that it MUST be quoted if it includes whitespace. Here we have an unquoted font name with a space in it. No wonder my latest SeaMonkey trunk nightly doesn't show barcode, even though I'm on Linux, I've installed the attached font (and restarted SeaMonkey), and I can see the font in font selectors as a barcode font.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b4pre) Gecko/20090411 SeaMonkey/2.0b1pre - Build ID: 20090411000526

This is in agreement with comment #3 and in contradiction with comment #5.

Independently of the fact that SeaMonkey 1 is essentially a dead end (much of Sm2 was rewritten, either from scratch or based on the backends used by Fx&Tb while keeping the traditional Suite look&feel), I believe that this bug is INVALID for any subdivision of "Core::Layout". However, if SourceForge is still using that invalid HTML, the bug might have some kind of a future under "Tech Evangelism::English (US)". See also if you want to move it there or to report an Evangelism follow-up.
P.S. When I add quotes around the font name and save the result locally, I see barcode instead of asdf when viewing the resulting HTML page on a file URL, which conforts me in the idea that the attached testcase is ill-formed.

Comment 8

10 years ago
Adding quotes around the font name does work using the testcase under Linux/Fedora.

I tried with the latest build under Windows and the font doesn't render either : Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1b4pre)
Gecko/20090413 Shiretoko/3.5b4pre

Comment 9

10 years ago
As Tony suggested I reported a Tech Evangelism bug :

Comment 10

10 years ago
using the testcase, I've just found out that fonts 'Wingdings', 'Webdings' do render using IE 6 but not firefox.
John, do you have any idea what might be going on here?
Assignee: general → nobody
QA Contact: general → layout.fonts-and-text

Comment 12

8 years ago
I seem to have the same problem with barcode font "Code EAN13" from

The barcode renders correctly on any version of Internet Explorer, but not on my current Firefox version 3.6.15

The encoded number '9HSOIKF*dabgif+' should result in a scannable ISBN barcode.
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 192890
You need to log in before you can comment on or make changes to this bug.