Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50482

Re: How do I get the OS System Font Directory(Cross-Platform) in python?

From Christian Heimes <christian@python.org>
Subject Re: How do I get the OS System Font Directory(Cross-Platform) in python?
Date 2013-07-12 03:27 +0200
References <3d97de86-f690-40ad-aba8-972120af7ff3@googlegroups.com> <dcca3b88-52fb-474f-8cce-4829149fcfaf@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.4607.1373592436.3114.python-list@python.org> (permalink)

Show all headers | View raw


Am 11.07.2013 19:19, schrieb Metallicow:
> @ Chris “Kwpolska” Warrick
> Thanks, that is a start anyway. 
> a Pure-Python way was what I was wanting, not win32api stuff.
> 
> "C:\Windows\Fonts"
> The windows path proves valid. Works on XP, Vista, 7. Not sure about win8....?

That's the wrong way to do it. You have to use the proper Windows API to
get to the font directory. It's SHGetKnownFolderPath() with
FOLDERID_Font or SHGetFolderPath() with CSIDL_FONTS.

See http://bugs.python.org/issue1763

Christian

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-11 08:32 -0700
  Re: How do I get the OS System Font Directory(Cross-Platform) in python? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-07-11 17:48 +0200
  Re: How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-11 08:54 -0700
    Re: How do I get the OS System Font Directory(Cross-Platform) in python? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-07-11 18:12 +0200
  Re: How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-11 10:19 -0700
    Re: How do I get the OS System Font Directory(Cross-Platform) in python? Christian Heimes <christian@python.org> - 2013-07-12 03:27 +0200
      Re: How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-11 21:24 -0700
        Re: How do I get the OS System Font Directory(Cross-Platform) in python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-12 04:55 +0000
        Re: How do I get the OS System Font Directory(Cross-Platform) in python? Chris Angelico <rosuav@gmail.com> - 2013-07-12 14:58 +1000
  Re: How do I get the OS System Font Directory(Cross-Platform) in python? Nobody <nobody@nowhere.com> - 2013-07-11 18:47 +0100
    Re: How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-11 11:25 -0700
      Re: How do I get the OS System Font Directory(Cross-Platform) in python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-07-11 20:13 -0400
      Re: How do I get the OS System Font Directory(Cross-Platform) in python? Tim Roberts <timr@probo.com> - 2013-07-12 22:36 -0700
        Re: How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-12 23:38 -0700
          Re: How do I get the OS System Font Directory(Cross-Platform) in python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-13 07:20 +0000

csiph-web