mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:32:46 +00:00 
			
		
		
		
	LibGfx: Remove the ability to load fonts from a path directly
This commit is contained in:
		
							parent
							
								
									4d039b05b2
								
							
						
					
					
						commit
						21d027129d
					
				
					 2 changed files with 0 additions and 22 deletions
				
			
		|  | @ -33,8 +33,6 @@ static DeprecatedString s_window_title_font_query; | |||
| static RefPtr<Font> s_fixed_width_font; | ||||
| static DeprecatedString s_fixed_width_font_query; | ||||
| 
 | ||||
| static DeprecatedString s_default_fonts_lookup_path = "/res/fonts"; | ||||
| 
 | ||||
| void FontDatabase::set_default_font_query(DeprecatedString query) | ||||
| { | ||||
|     if (s_default_font_query == query) | ||||
|  | @ -61,18 +59,6 @@ DeprecatedString FontDatabase::window_title_font_query() | |||
|     return s_window_title_font_query; | ||||
| } | ||||
| 
 | ||||
| void FontDatabase::set_default_fonts_lookup_path(DeprecatedString path) | ||||
| { | ||||
|     if (s_default_fonts_lookup_path == path) | ||||
|         return; | ||||
|     s_default_fonts_lookup_path = move(path); | ||||
| } | ||||
| 
 | ||||
| DeprecatedString FontDatabase::default_fonts_lookup_path() | ||||
| { | ||||
|     return s_default_fonts_lookup_path; | ||||
| } | ||||
| 
 | ||||
| Font& FontDatabase::default_font() | ||||
| { | ||||
|     if (!s_default_font) { | ||||
|  | @ -121,11 +107,6 @@ struct FontDatabase::Private { | |||
|     HashMap<FlyString, Vector<NonnullRefPtr<Typeface>>, AK::ASCIICaseInsensitiveFlyStringTraits> typefaces; | ||||
| }; | ||||
| 
 | ||||
| void FontDatabase::load_all_fonts_from_path(DeprecatedString const& path) | ||||
| { | ||||
|     load_all_fonts_from_uri(MUST(String::formatted("file://{}", path))); | ||||
| } | ||||
| 
 | ||||
| void FontDatabase::load_all_fonts_from_uri(StringView uri) | ||||
| { | ||||
|     auto root_or_error = Core::Resource::load_from_uri(uri); | ||||
|  | @ -168,7 +149,6 @@ FontDatabase::FontDatabase() | |||
|     : m_private(make<Private>()) | ||||
| { | ||||
|     load_all_fonts_from_uri("resource://fonts"sv); | ||||
|     load_all_fonts_from_path(s_default_fonts_lookup_path); | ||||
| } | ||||
| 
 | ||||
| void FontDatabase::for_each_font(Function<void(Gfx::Font const&)> callback) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andrew Kaster
						Andrew Kaster