From: afresh1 Date: Sun, 16 May 2021 22:48:05 +0000 (+0000) Subject: Make all unicode Private Use areas SWIDTH1 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ecda81b0b93090c708d1d6b826e2616b81d73d5f;p=openbsd Make all unicode Private Use areas SWIDTH1 Noticed by naddy@ due to a commit in nano. There's no current mechanism to allow people who put codepoints in these private use areas to specify their width, we can however guess that people who put things there are most likely adding SWIDTH1 glyphs and making that the default will be most likely to do what they want. In addition, that's apparently what other systems do already. Much feedback and OK schwarze@ --- diff --git a/share/locale/ctype/en_US.UTF-8.src b/share/locale/ctype/en_US.UTF-8.src index 3fd2888ee94..3f7b637f329 100644 --- a/share/locale/ctype/en_US.UTF-8.src +++ b/share/locale/ctype/en_US.UTF-8.src @@ -1,4 +1,4 @@ -/* $OpenBSD: en_US.UTF-8.src,v 1.11 2021/05/16 22:38:31 afresh1 Exp $ */ +/* $OpenBSD: en_US.UTF-8.src,v 1.12 2021/05/16 22:48:05 afresh1 Exp $ */ /* * COPYRIGHT AND PERMISSION NOTICE @@ -6458,7 +6458,7 @@ SWIDTH0 0xe0100 - 0xe01ef GRAPH 0xf0000 - 0xffffd PRINT 0xf0000 - 0xffffd SPECIAL 0xf0000 - 0xffffd -SWIDTH0 0xf0000 - 0xffffd +SWIDTH1 0xf0000 - 0xffffd /* @@ -6468,7 +6468,7 @@ SWIDTH0 0xf0000 - 0xffffd GRAPH 0x100000 - 0x10fffd PRINT 0x100000 - 0x10fffd SPECIAL 0x100000 - 0x10fffd -SWIDTH0 0x100000 - 0x10fffd +SWIDTH1 0x100000 - 0x10fffd /* diff --git a/share/locale/ctype/gen_ctype_utf8.pl b/share/locale/ctype/gen_ctype_utf8.pl index 559a1b349dc..03d24914014 100755 --- a/share/locale/ctype/gen_ctype_utf8.pl +++ b/share/locale/ctype/gen_ctype_utf8.pl @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# $OpenBSD: gen_ctype_utf8.pl,v 1.6 2021/05/16 22:38:32 afresh1 Exp $ # +# $OpenBSD: gen_ctype_utf8.pl,v 1.7 2021/05/16 22:48:05 afresh1 Exp $ # use 5.022; use warnings; @@ -402,8 +402,8 @@ sub codepoint_columns my ( $code, $charinfo ) = @_; return undef unless defined $code; - # Several fonts provide glyphs in this range - return 1 if $code >= 0xe000 and $code <= 0xf8ff; + # Private use areas are _most likely_ used by one column glyphs + return 1 if $charinfo->{category} eq 'Co'; return 0 if $charinfo->{category} eq 'Mn'; return 0 if $charinfo->{category} eq 'Me';