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:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=x8K+5GEY4TCctwXQV6hCw63S+U9IHCluIjkOIZb2Edw=; b=t60r6VMW2umR00dGFAmiYuTsMtzck4C83d9yFucfFFxCDJliXcb0n5yEnEXF2vB5Ps b7P0u7afe+7Tesm1mLGqSbU07JliUx70Hrsoq/5Int9YH16ecB4xBv7/F9Zgi9+h2xYu YMZZrya0m+B3Yosgb5TBDsIvlgb+WiHOhAmQD4eJGiIwcdWBp8zi2Ag/XJOh3KpfHRoa lIlrLB/BwT1RVsF+1BARhKnAqMNRCfVubw7UVPhxgNj0asETwKJn/OsnF+OdB1rSJ75S ijstUNGYtI7jVPJuTimtJVsZPd387Mk9m6enJKFHzt/VVy/ohNrNIAyQ4lvKcULHYxFw L/6w== MIME-Version: 1.0 X-Received: by 10.52.246.198 with SMTP id xy6mr11721473vdc.7.1409978079806; Fri, 05 Sep 2014 21:34:39 -0700 (PDT) In-Reply-To: <201409060357.s863vvBL013729@envy.delorie.com> References: <201409051618 DOT s85GIdb8024685 AT envy DOT delorie DOT com> <5409F1C2 DOT 3090406 AT xs4all DOT nl> <201409051752 DOT s85Hqnr2027362 AT envy DOT delorie DOT com> <20140905184829 DOT GH3196 AT cicely7 DOT cicely DOT de> <20140905204312 DOT GJ3196 AT cicely7 DOT cicely DOT de> <540A22EF DOT 5030701 AT estechnical DOT co DOT uk> <201409052113 DOT s85LDfxf001064 AT envy DOT delorie DOT com> <201409060357 DOT s863vvBL013729 AT envy DOT delorie DOT com> Date: Sat, 6 Sep 2014 14:04:39 +0930 Message-ID: Subject: Re: [geda-user] Chinese glyph rendering in pcb as symbols From: Erich Heinzle To: geda-user Content-Type: multipart/alternative; boundary=001a1133b890968b4805025e1a1a Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --001a1133b890968b4805025e1a1a Content-Type: text/plain; charset=UTF-8 Fair point re: seamless ability of unicode to allow traditional ascii use The firefly bitmaps embedded within the chinese .ttf can be obtained as standalone bdf files there is a bdf file for each bitmap size 11x11 through to 16x16 the tar.gz of all of them weighs in at 2.7MB I started with 16x16 as I figured it would be the most readable, and the stroked symbol can be scaled thereafter in PCB anyway. PCB may need to be made cleverer when it scales up/down symbols, so that the linewidths scale more proportionally. -rw-rw-r-- 1 esh esh 2760898 Aug 30 22:37 ../firefly-bdf-bitmap.tar.gz -rw-r--r-- 1 esh esh 2379772 Mar 27 2005 fireflyR11.bdf -rw-r--r-- 1 esh esh 2469844 Mar 27 2005 fireflyR12.bdf -rw-r--r-- 1 esh esh 2549475 Mar 27 2005 fireflyR13.bdf -rw-r--r-- 1 esh esh 2638024 Mar 27 2005 fireflyR14.bdf -rw-r--r-- 1 esh esh 2720938 Mar 27 2005 fireflyR15.bdf -rw-r--r-- 1 esh esh 2812183 Mar 27 2005 fireflyR16.bdf The relevant resolution bdf would be sufficient in the user's local pcb installation if the larger ttf outline glyphs aren't going to be used. My conversion code simply reads a bdf description extracted from a bdf file, (the bdf file is a bunch of these statements) such as: STARTCHAR uni68F9 ENCODING 26873 SWIDTH 1000 0 DWIDTH 16 0 BBX 15 15 0 -1 BITMAP 1020 1024 103E 1020 FDFC 1104 19FC 3504 55FC 5124 9020 97FE 1020 1020 1020 ENDCHAR and the alpha code can spit out an xbm, a dot matrix pcb symbol, an ASCII rendition, and a stroked PCB symbol. On the fly conversion with a large bdf file should be simple enough. I am not sure how much of a wrapper the ttf format would add. I haven't got my code searching & extracting a glyph description from the big bdf file yet, as I have been working on the heuristics. So far it only processes a single bdf description that it is given and the code needs some tidying up. I agree with the already expressed sentiment that it would be really good to grow the potential user base with glyph support. Cheers Erich. On Sat, Sep 6, 2014 at 1:27 PM, DJ Delorie wrote: > > The whole point of UTF-8 is that we don't need something to tell UTF-8 > strings from ascii strings :-) > > Symbol[''] > Symbol[''] > > And I don't think storing hundreds, if not thousands, of glyphs in the > *.pcb file as Symbol[]s, makes any sense at all. We really need to be > able to read a *.ttf file directly if we're going to support large > fonts. > > > If the PCB file format becomes binary, > > I think a zip file is OK, because lots of OSS projects use zip, and > the internal file is still ascii anyway so you can always extract it. > Best of both worlds :-) > --001a1133b890968b4805025e1a1a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Fair point re: seamless ability of unicode to allow tradit= ional ascii use

The firefly bitmaps embedded within the chinese .ttf= can be obtained as standalone bdf files
there is a bdf file for each bi= tmap size 11x11 through to 16x16
the tar.gz of all of them weighs in at = 2.7MB
I started with 16x16 as I figured it would be the most readable, a= nd the stroked symbol can be scaled thereafter in PCB anyway.
PCB may ne= ed to be made cleverer when it scales up/down symbols, so that the linewidt= hs scale more proportionally.

-rw-rw-r-- 1 esh esh 2760898 Aug = 30 22:37 ../firefly-bdf-bitmap.tar.gz
-rw-r--r-- 1 esh esh 2379772 Mar 2= 7=C2=A0 2005 fireflyR11.bdf
-rw-r--r-- 1 esh esh 2469844 Mar 27=C2=A0 20= 05 fireflyR12.bdf
-rw-r--r-- 1 esh esh 2549475 Mar 27=C2=A0 2005 firefly= R13.bdf
-rw-r--r-- 1 esh esh 2638024 Mar 27=C2=A0 2005 fireflyR14.bdf-rw-r--r-- 1 esh esh 2720938 Mar 27=C2=A0 2005 fireflyR15.bdf
-rw-r--r-= - 1 esh esh 2812183 Mar 27=C2=A0 2005 fireflyR16.bdf

The = relevant resolution bdf would be sufficient in the user's local pcb ins= tallation if the larger ttf outline glyphs aren't going to be used.
=

My conversion code simply reads a bdf description= extracted from a bdf file, (the bdf file is a bunch of these statements) s= uch as:

STARTCHAR uni68F9
ENCODING 26873
SWIDTH 1000 0
DWID= TH 16 0
BBX 15 15 0 -1
BITMAP
1020
1024
103E
1020
FDFC=
1104
19FC
3504
55FC
5124
9020
97FE
1020
10201020
ENDCHAR

and the alpha code can spit out an xbm, = a dot matrix pcb symbol, an ASCII rendition, and a stroked PCB symbol.
<= br>
On the fly conversion with a large bdf file should be simple = enough. I am not sure how much of a wrapper the ttf format would add.

I haven't got my code searching & extractin= g a glyph description from the big bdf file yet, as I have been working on = the heuristics. So far it only processes a single bdf description that it i= s given and the code needs some tidying up.

I agree with = the already expressed sentiment that it would be really good to grow the po= tential user base with glyph support.

Cheers

Erich= .



On Sat, Sep 6, 2014 at 1:27 PM, DJ Delorie &= lt;dj AT delorie DOT com&g= t; wrote:

The whole point of UTF-8 is that we don't need something to tell UTF-8<= br> strings from ascii strings :-)

Symbol['<ascii character>']
Symbol['<utf8 character>']

And I don't think storing hundreds, if not thousands, of glyphs in the<= br> *.pcb file as Symbol[]s, makes any sense at all.=C2=A0 We really need to be=
able to read a *.ttf file directly if we're going to support large
fonts.

> If the PCB file format becomes binary,

I think a zip file is OK, because lots of OSS projects use zip, and<= br> the internal file is still ascii anyway so you can always extract it.
Best of both worlds :-)

--001a1133b890968b4805025e1a1a--