Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'syntax': 0.04; 'configure': 0.05; 'subject:Python': 0.06; 'desired.': 0.07; 'tkinter': 0.07; 'utf-8': 0.07; 'metrics': 0.09; 'override': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'strings.': 0.09; 'python': 0.11; 'gui': 0.12; 'jan': 0.12; 'at.': 0.16; 'character.': 0.16; 'internally': 0.16; 'language?': 0.16; 'properties,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'sizes,': 0.16; 'subject:GUI': 0.16; 'subject:desktop': 0.16; 'text?': 0.16; 'used"': 0.16; 'language': 0.16; 'wrote:': 0.18; 'widget': 0.19; 'platforms': 0.22; 'header:User-Agent:1': 0.23; 'unicode': 0.24; "i've": 0.25; 'nearly': 0.26; '(for': 0.26; 'header:X-Complaints- To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'character': 0.29; 'gives': 0.31; 'code': 0.31; '(although': 0.31; 'font': 0.31; 'piece': 0.31; 'subject:next': 0.31; 'could': 0.34; 'info': 0.35; 'display': 0.35; 'but': 0.35; 'adjust': 0.36; 'idle': 0.36; 'easily': 0.37; 'easiest': 0.38; 'whatever': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'obtain': 0.39; 'received:71': 0.39; 'to:addr:python.org': 0.39; 'system.': 0.39; 'received:org': 0.40; 'how': 0.40; 'read': 0.60; 'color': 0.61; 'tag': 0.61; 'times': 0.62; 'complete': 0.62; 'such': 0.63; 'more': 0.64; 'believe': 0.68; 'discover': 0.82; '"just': 0.84; 'bounding': 0.84; 'category.': 0.84; 'chinese,': 0.84; 'fonts': 0.84; 'glenn': 0.84; 'received:fios.verizon.net': 0.84; 'subject:Project': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Exploring Python for next desktop GUI Project Date: Thu, 24 Jul 2014 19:25:55 -0400 References: <93c42547-557b-4839-baba-9ed54120595e@googlegroups.com> <53D15A5F.6030907@g.nevcal.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-71-175-90-87.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <53D15A5F.6030907@g.nevcal.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406244379 news.xs4all.nl 2848 [2001:888:2000:d::a6]:60871 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75189 On 7/24/2014 3:11 PM, Glenn Linderman wrote: > Not knowing any of these GUI platforms (although I've read some about > Tk), I have some questions. > > * Which of them use UTF-8 as their native Unicode interface? tk uses UCS-2 internally for the BMP subset. It does not display astral chars. tkinter iterfaces via with Python strings. > * Which makes it easiest to discover and adjust font metrics such as > kerning? I believe tk can use whatever fonts are on the system. Idle gives me a choice of more than I want to look at. Tk does kerning with proportional fonts, but I believe info and control is not user acccessible. The main available metrics are max ascender and descender sizes, for interline spacing. > * Which makes it easiest to obtain bounding rectangles of a piece of text? The Text.bbox(index) returns the bounding rectangle for a character. Those can be combined as desired. > * Which makes it easiest to use a set of fonts such as Times (for Latin) > and others for Cyrillic, Chinese, and Korean? Or which supplies a font > configuration that can "just be used" for any language? 'any language' requires a nearly complete unicode font. One can tag character sequences, and configure properties, including color and font, that override the widget defaults. This is how Idle colorizes Python code by syntax category. One could just as easily tag by language or by alphabet. -- Terry Jan Reedy