NetBSD Problem Report #44110

From dholland@eecs.harvard.edu  Thu Nov 18 06:14:12 2010
Return-Path: <dholland@eecs.harvard.edu>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id A09A863BA98
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 18 Nov 2010 06:14:12 +0000 (UTC)
Message-Id: <20101118061044.A61EFF8FF@tanaqui.eecs.harvard.edu>
Date: Thu, 18 Nov 2010 01:10:44 -0500 (EST)
From: dholland@eecs.harvard.edu
Reply-To: dholland@eecs.harvard.edu
To: gnats-bugs@gnats.NetBSD.org
Subject: curses does not support all four playing card suit characters
X-Send-Pr-Version: 3.95

>Number:         44110
>Category:       lib
>Synopsis:       curses does not support all four playing card suit characters
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 18 06:15:00 +0000 2010
>Closed-Date:    Wed Oct 20 06:45:35 +0000 2021
>Last-Modified:  Thu Oct 21 08:05:01 +0000 2021
>Originator:     David A. Holland
>Release:        NetBSD 5.99.39
>Organization:
>Environment:
System: NetBSD valkyrie 5.99.39 NetBSD 5.99.39 (VALKYRIE) #16: Wed Nov 17 16:50:52 EST 2010  dholland@valkyrie:/usr/src/sys/arch/amd64/compile/VALKYRIE amd64
Architecture: x86_64
Machine: amd64
>Description:

curses.h defines ACS_DIAMOND, but not ACS_HEART, ACS_CLUB, or ACS_SPADE.
(presumably because someone sometime wanted ACS_DIAMOND as a bullet
point character or the like)

This makes the user interface of canfield(6) and other card games suck.

>How-To-Repeat:

grep

>Fix:

Add them and add the necessary bits to terminfo? Many terminals and
terminal fonts do have glyphs for all four suits.

>Release-Note:

>Audit-Trail:
From: Brett Lymn <blymn@baea.com.au>
To: gnats-bugs@NetBSD.org
Cc: lib-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: lib/44110: curses does not support all four playing card suit characters
Date: Fri, 19 Nov 2010 14:20:36 +1030

 On Thu, Nov 18, 2010 at 06:15:00AM +0000, dholland@eecs.harvard.edu wrote:
 > 
 > curses.h defines ACS_DIAMOND, but not ACS_HEART, ACS_CLUB, or ACS_SPADE.
 > (presumably because someone sometime wanted ACS_DIAMOND as a bullet
 > point character or the like)
 > 

 I cannot find a reference to any of those ACS symbols apart from
 ACS_DIAMOND.  Checking solaris (original SYSV curses) and ncurses
 turns up nothing as does a search on google.

 > This makes the user interface of canfield(6) and other card games suck.
 > 

 no doubt about that...

 > 
 > Add them and add the necessary bits to terminfo? Many terminals and
 > terminal fonts do have glyphs for all four suits.

 Well, taking on board that it would be totally non-standard...The
 battle here is you need to identify character that will produce the
 right shape when the alternate character mode (smacs) is on.  Once
 that is found it is a matter of either extending the acsc or if the
 character is already in the string, using it.

 -- 
 Brett Lymn
 "Warning:
 The information contained in this email and any attached files is
 confidential to BAE Systems Australia. If you are not the intended
 recipient, any use, disclosure or copying of this email or any
 attachments is expressly prohibited.  If you have received this email
 in error, please notify us immediately. VIRUS: Every care has been
 taken to ensure this email and its attachments are virus free,
 however, any loss or damage incurred in using this email is not the
 sender's responsibility.  It is your responsibility to ensure virus
 checks are completed before installing any data sent in this email to
 your computer."


From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: lib/44110: curses does not support all four playing card suit
 characters
Date: Sat, 20 Nov 2010 18:50:38 +0000

 On Fri, Nov 19, 2010 at 03:55:02AM +0000, Brett Lymn wrote:
  >  > curses.h defines ACS_DIAMOND, but not ACS_HEART, ACS_CLUB, or ACS_SPADE.
  >  > (presumably because someone sometime wanted ACS_DIAMOND as a bullet
  >  > point character or the like)
  >  
  >  I cannot find a reference to any of those ACS symbols apart from
  >  ACS_DIAMOND.  Checking solaris (original SYSV curses) and ncurses
  >  turns up nothing as does a search on google.

 Right, presumably because someone wanted diamonds as bullet points but
 ignored the others...

  >  > Add them and add the necessary bits to terminfo? Many terminals and
  >  > terminal fonts do have glyphs for all four suits.
  >  
  >  Well, taking on board that it would be totally non-standard...The
  >  battle here is you need to identify character that will produce the
  >  right shape when the alternate character mode (smacs) is on.  Once
  >  that is found it is a matter of either extending the acsc or if the
  >  character is already in the string, using it.

 I don't currently see any way to make wscons print these symbols, so
 perhaps worrying about it in curses is premature.

 sigh.

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: open->closed
State-Changed-By: blymn@NetBSD.org
State-Changed-When: Wed, 20 Oct 2021 06:45:35 +0000
State-Changed-Why:
Closing this, curses can't output something a terminal doesn't support.


From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: blymn@NetBSD.org
Subject: Re: lib/44110 (curses does not support all four playing card suit
 characters)
Date: Thu, 21 Oct 2021 00:00:53 +0000

 On Wed, Oct 20, 2021 at 06:45:36AM +0000, blymn@NetBSD.org wrote:
  > Synopsis: curses does not support all four playing card suit characters
  > 
  > State-Changed-From-To: open->closed
  > State-Changed-By: blymn@NetBSD.org
  > State-Changed-When: Wed, 20 Oct 2021 06:45:35 +0000
  > State-Changed-Why:
  > Closing this, curses can't output something a terminal doesn't support.

 What's the state of wide characters and unicode output? It appears
 that the glyphs wanted are Unicode code points 0x2660, 0x2663, 0x2665,
 and 0x2666. (Or maybe 0x2661-2.) And also there's a full card set
 starting at 0x1F0A1.

 https://en.wikipedia.org/wiki/Playing_cards_in_Unicode

 If these can be made to work, that would definitely be sufficient.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Brett Lymn <blymn@internode.on.net>
To: David Holland <dholland-bugs@netbsd.org>
Cc: gnats-bugs@netbsd.org, blymn@NetBSD.org
Subject: Re: lib/44110 (curses does not support all four playing card suit
 characters)
Date: Thu, 21 Oct 2021 16:09:39 +1030

 On Thu, Oct 21, 2021 at 12:00:53AM +0000, David Holland wrote:
 > 
 > What's the state of wide characters and unicode output? It appears
 > that the glyphs wanted are Unicode code points 0x2660, 0x2663, 0x2665,
 > and 0x2666. (Or maybe 0x2661-2.) And also there's a full card set
 > starting at 0x1F0A1.
 > 

 Wide characters are supported by default in NetBSD curses.  The same
 characters are defined for both narrow and wide ACS (the wide versions
 are unicode renditions of the narrow characters).  So no real difference
 there.

 > https://en.wikipedia.org/wiki/Playing_cards_in_Unicode
 > 
 > If these can be made to work, that would definitely be sufficient.
 > 

 The application should be able to add those characters using the wide
 character calls in curses.  So, yes, it should work but it is really an
 application thing not a curses library level thing.

 If you are wanting to extend the ACS character set it would make NetBSD
 curses non-standard and would require custom terminfo entries to support
 the extended character set *and* it would probably only work in wide
 mode.  I suspect the ACS characters defined map onto the vt100 DEC
 Special Graphics Character Set and have stayed that way ever since.

 -- 
 Brett Lymn
 --
 Sent from my NetBSD device.

 "We are were wolves",
 "You mean werewolves?",
 "No we were wolves, now we are something else entirely",
 "Oh"

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: gnats-precook-prs,v 1.4 2018/12/21 14:20:20 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.