On Tue, Oct 16, 2012 at 4:51 PM, June Kim (김창준) <junea...@gmail.com> wrote:
> On Tue, Oct 16, 2012 at 10:52 AM, bill lam <bbill....@gmail.com> wrote: > >> Usually a chinese character occupies twice the width of an ascii >> character in fixed width fonts. You may add some logic to test for >> a CJK characters (range 4E00–9FFF and 3400–4DBF) >> >> http://en.wikipedia.org/wiki/CJK_Unified_Ideographs >> >> to estimate the width if they all were ascii. >> >> > I already made a script for that: http://www.jsoftware.com/jwiki/JuneKim > For example, the following works without a problem: load '~temp/box.ijs' NB. unicodedata.ijs should be at the right place as well bstr < u: 9017 32 9054 bstr <'以圖片形式檢視變音符號表' NB. displays correct boxing with CJK characters > >> Втр, 16 Окт 2012, Ian Clark писал(а): >> > Has anyone else felt the need to display a boxed noun which contains >> > Unicode glyphs? >> > >> > Such as: >> > < u: 9017 32 9054 >> > You'll know that the box structure breaks up, because J wants to treat >> > '⌹' as 3 letters, whereas it only takes up one glyph on the screen. >> > >> > Check out my new (beta) Addon: format/sbox, which lets you input (say): >> > require 'format/sbox' >> > sbox < u: 9017 32 9054 >> > for a corrected display. >> > >> > Read the write-up at: http://www.jsoftware.com/jwiki/Addons/format/sbox >> > >> > A Lab gets installed with the Addon: >> > Category: Format >> > Lab: Displaying boxed nouns containing Unicode glyphs >> > >> > There's also a test/demo script: >> > load 'format/sbox/test' >> > >> > IanClark >> > ---------------------------------------------------------------------- >> > For information about J forums see http://www.jsoftware.com/forums.htm >> >> -- >> regards, >> ==================================================== >> GPG key 1024D/4434BAB3 2008-08-24 >> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm