我是安装easygui-0.98.1 不知道在哪里设置字体?
Lib\site-packages\easygui\easygui.py只有这些代码
if __name__ == '__main__':
from boxes.demo import easygui_demo
easygui_demo()
# from boxes.alt_text_box import demo_textbox
# demo_textbox()
进入easygui的配置文件里修改相关的属性,包括字体 如果要修改字体,修改easygui的源代码即可。
修改字体的属性是:PROPORTIONAL_FONT_FAMILY 在Lib\site-packages\easygui.py中,搜索font,然后修改PROPORTIONAL_FONT_FAMILY后面的设置 新手·ing 发表于 2017-4-12 17:57
如果要修改字体,修改easygui的源代码即可。
修改字体的属性是:PROPORTIONAL_FONT_FAMILY
我的easygui.py没有 PROPORTIONAL_FONT_FAMILY
只有这段
"""
.. moduleauthor:: easygui developers and Stephen Raymond Ferg
.. default-domain:: py
.. highlight:: python
Version |release|
ABOUT EASYGUI
=============
EasyGui provides an easy-to-use interface for simple GUI interaction
with a user.It does not require the programmer to know anything about
tkinter, frames, widgets, callbacks or lambda.All GUI interactions are
invoked by simple function calls that return results.
.. warning:: Using EasyGui with IDLE
You may encounter problems using IDLE to run programs that use EasyGui. Try it
and find out.EasyGui is a collection of Tkinter routines that run their own
event loops.IDLE is also a Tkinter application, with its own event loop.The
two may conflict, with unpredictable results. If you find that you have
problems, try running your EasyGui program outside of IDLE.
.. note:: EasyGui requires Tk release 8.0 or greater.
LICENSE INFORMATION
===================
EasyGui version |version|
Copyright (c) 2014, Stephen Raymond Ferg
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ABOUT THE EASYGUI LICENSE
-------------------------
| This license is what is generally known as the "modified BSD license",
| aka "revised BSD", "new BSD", "3-clause BSD".
| See http://www.opensource.org/licenses/bsd-license.php
|
| This license is GPL-compatible.
| See `<http://en.wikipedia.org/wiki/License_compatibility>`_
| See http://www.gnu.org/licenses/license-liglobal_state.html#GPLCompatibleLicenses
|
| The BSD License is less restrictive than GPL.
| It allows software released under the license to be incorporated into proprietary products.
| Works based on the software may be released under a proprietary license or as closed source software.
| `<http://en.wikipedia.org/wiki/BSD_licenses#3-clause_license_.28.22New_BSD_License.22.29>`_
API
===
"""
if __name__ == '__main__':
from boxes.demo import easygui_demo
easygui_demo()
# from boxes.alt_text_box import demo_textbox
# demo_textbox()
Pan嗯嗯 发表于 2017-4-13 17:37
我的easygui.py没有 PROPORTIONAL_FONT_FAMILY
只有这段
你这是软件介绍什么的...
你找错了, 0.98.1找不到源文件 运行easygui 后显示的文字默认左对齐,如何调整 运行时默认显示中间位置? easygui/boxes/global_state.py 里面有个
PROPORTIONAL_FONT_FAMILY = {}
虽然我改了也没看出字体改变来...
楼主解决了吗?我也遇到了 Pan嗯嗯 发表于 2017-4-13 17:37
我的easygui.py没有 PROPORTIONAL_FONT_FAMILY
只有这段
楼主解决了吗 我也遇到相同的问题 光宇 发表于 2017-4-13 14:09
在Lib\site-packages\easygui.py中,搜索font,然后修改PROPORTIONAL_FONT_FAMILY后面的设置
没用过0.98版本就不要来误人子弟 ietar 发表于 2019-3-10 09:37
easygui/boxes/global_state.py 里面有个
PROPORTIONAL_FONT_FAMILY = {}
我也是。。 这个改了之后打包发给别人,别人也是更改后的字体吗
页:
[1]