From 79cca25704c471e9f49c69665a5ecd423e5dd696 Mon Sep 17 00:00:00 2001 From: orionaskatu <100234619+orionaskatu@users.noreply.github.com> Date: Fri, 9 Sep 2022 19:13:52 +0200 Subject: Embed roboto --- modules/shared.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'modules/shared.py') diff --git a/modules/shared.py b/modules/shared.py index 5985d09e..83deeb15 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -80,16 +80,6 @@ prompt_styles = modules.styles.load_styles(styles_filename) face_restorers = [] -def find_any_font(): - fonts = ['/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf'] - - for font in fonts: - if os.path.exists(font): - return font - - return "Arial.TTF" - - class Options: class OptionInfo: def __init__(self, default=None, label="", component=None, component_args=None): @@ -121,7 +111,7 @@ class Options: "jpeg_quality": OptionInfo(80, "Quality for saved jpeg images", gr.Slider, {"minimum": 1, "maximum": 100, "step": 1}), "export_for_4chan": OptionInfo(True, "If PNG image is larger than 4MB or any dimension is larger than 4000, downscale and save copy as JPG"), "enable_pnginfo": OptionInfo(True, "Save text information about generation parameters as chunks to png files"), - "font": OptionInfo(find_any_font(), "Font for image grids that have text"), + "font": OptionInfo("", "Font for image grids that have text"), "enable_emphasis": OptionInfo(True, "Use (text) to make model pay more attention to text text and [text] to make it pay less attention"), "save_txt": OptionInfo(False, "Create a text file next to every image with generation parameters."), "ESRGAN_tile": OptionInfo(192, "Tile size for upscaling. 0 = no tiling.", gr.Slider, {"minimum": 0, "maximum": 512, "step": 16}), -- cgit v1.2.3