delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/09/21/12:09:48

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:date:message-id:subject:from:to:content-type;
bh=riEqQW/CKO3p1IlVeAAWQhCKT6xaDF4gxdDHtzmsgr0=;
b=TSxAComCbOsE9XeSJOWljxEf7K0fqMcVdH/dWjzIsY1MiJ+x1UniaCbyJzIfx8fn7g
6KnLG+RRyPpJh14p148YC+K7Y8J8jpdrRvbrdVQ8Tv+GPIqWg6v33zxuPMupCMZXeMoY
EsLQjZr6pq1toinjtAgiDf+0J2HkUZjfMfTF18fWlGycKpOt/XsL4XjTG1mPMTizGVSd
IQ85K7NLPWDzQJ4EBqjZopdrIlorAffKreTfvfUXvtOL8mqQLWfEYWFQNXerRd9khCuO
gruguuACl2tbj/oGmIAXidZwgS6Z7/iuvKQQndS5zlAzcyn8PpGPE7/3Qdva6w10xQyn
ca8g==
MIME-Version: 1.0
X-Received: by 10.50.66.234 with SMTP id i10mr9170036igt.34.1411315741973;
Sun, 21 Sep 2014 09:09:01 -0700 (PDT)
Date: Mon, 22 Sep 2014 01:39:01 +0930
Message-ID: <CAHUm0tOTThAktrCR0vqGzhtB2fLNxP08UH+q6usk_8D+uRpoag@mail.gmail.com>
Subject: [geda-user] 16x16 bdf bitmap -> PCB symbol tool
From: Erich Heinzle <a1039181 AT gmail DOT com>
To: geda-user <geda-user AT delorie DOT com>
Reply-To: geda-user AT delorie DOT com

--047d7bdc1a6c7763820503958db6
Content-Type: text/plain; charset=UTF-8

I have finished off the code I used to generate Chinese/Japanese/Korean
Firefly bitmap glyphs to pcb symbols

http://users.on.net/~esh/geda/pcb/src/fonts/pcbGlyphTool-v1.0.c

This more polished version of the code fixes a boundary condition affecting
2 or 3 glyphs in the Firefly CJK 16x16 font set with pixels along edges.

The utility compiles easily with gcc and one need only feed it with a bdf
symbol definition or a stream of bdf symbol definitions to produce PCB
symbols for insertion into a PCB layout, with suitable re-labeling to
comply with the current limitations imposed by the implementation of
"Symbol" which only copes with ~ 127 symbols.

i.e.

cat mydesiredglyph.bdf | ./pcbGlyphTool > NewSymbolForPCB.pcb

./pcbGlyphTool -h

will list other options, including -d "dot matrix rendition", -o "omitting"
conversion of diagonals into strokes, -v "verbose" mode, and -x generate an
xbm mode.

It should convert any bdf formatted bitmap up to 16x16 pixels into
SymbolLine strokes replacing contiguous pixels in horizontal, vertical or
diagonal directions, and it will render remaining "orphan pixels" as a dot.

This is the same tool I used to generate the Hebrew font from the Unifont
bdf while testing,

http://users.on.net/~esh/geda/pcb/src/fonts/gEDA-PCB-Unifont-Hebrew.pcb
http://users.on.net/~esh/geda/pcb/src/fonts/UnifontDerivedHebrew_Font

Someone may find the utility or its subroutines useful. One thought is
implementing the ability to do on the fly extraction of a unicode bdf
definition from a bdf font file into a PCB layout from a geda PCB menu or a
button analogous to the "insert text" button. The issue of extending
"Symbol" to support more than the ASCII code page would need to be dealt
with.

I make no claims as to the code's elegance or fitness for purpose...

Cheers

Erich

--047d7bdc1a6c7763820503958db6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I have finished off the code I used to generate Chinese/Ja=
panese/Korean Firefly bitmap glyphs to pcb symbols<br><div><br><a href=3D"h=
ttp://users.on.net/~esh/geda/pcb/src/fonts/pcbGlyphTool-v1.0.c">http://user=
s.on.net/~esh/geda/pcb/src/fonts/pcbGlyphTool-v1.0.c</a><br><br></div><div>=
This more polished version of the code fixes a boundary condition affecting=
 2 or 3 glyphs in the Firefly CJK 16x16 font set with pixels along edges.<b=
r></div><div><br></div><div>The utility compiles easily with gcc and one ne=
ed only feed it with a bdf symbol definition or a stream of bdf symbol defi=
nitions to produce PCB symbols for insertion into a PCB layout, with suitab=
le re-labeling to comply with the current limitations imposed by the implem=
entation of &quot;Symbol&quot; which only copes with ~ 127 symbols.<br></di=
v><div><br></div><div>i.e.<br><br>cat mydesiredglyph.bdf | ./pcbGlyphTool &=
gt; NewSymbolForPCB.pcb<br></div><div><br></div><div>./pcbGlyphTool -h<br><=
br></div><div>will list other options, including -d &quot;dot matrix rendit=
ion&quot;, -o &quot;omitting&quot; conversion of diagonals into strokes, -v=
 &quot;verbose&quot; mode, and -x generate an xbm mode.<br></div><div><br>I=
t should convert any bdf formatted bitmap up to 16x16 pixels into SymbolLin=
e strokes replacing contiguous pixels in horizontal, vertical or diagonal d=
irections, and it will render remaining &quot;orphan pixels&quot; as a dot.=
<br><br></div><div>This is the same tool I used to generate the Hebrew font=
 from the Unifont bdf while testing,<br><br><a href=3D"http://users.on.net/=
%7Eesh/geda/pcb/src/fonts/gEDA-PCB-Unifont-Hebrew.pcb" target=3D"_blank">ht=
tp://users.on.net/~esh/geda/pcb/src/fonts/gEDA-PCB-Unifont-Hebrew.pcb</a><b=
r><a href=3D"http://users.on.net/%7Eesh/geda/pcb/src/fonts/UnifontDerivedHe=
brew_Font" target=3D"_blank">http://users.on.net/~esh/geda/pcb/src/fonts/Un=
ifontDerivedHebrew_Font</a><br><br></div><div>Someone may find the utility =
or its subroutines useful. One thought is implementing the ability to do on=
 the fly extraction of a unicode bdf definition from a bdf font file into a=
 PCB layout from a geda PCB menu or a button analogous to the &quot;insert =
text&quot; button. The issue of extending &quot;Symbol&quot; to support mor=
e than the ASCII code page would need to be dealt with.<br><br>I make no cl=
aims as to the code&#39;s elegance or fitness for purpose...<br><br>Cheers<=
br><br>Erich<br></div></div>

--047d7bdc1a6c7763820503958db6--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019