From cc510967bc6c64c8609ea9244f557ef10d5c4eda Mon Sep 17 00:00:00 2001 From: "rapture.party" Date: Thu, 2 Apr 2026 17:52:02 -0400 Subject: [PATCH] Initial commit --- .editorconfig | 365 ++++++++++++++++++++++ .gitignore | 17 + About/About.xml | 29 ++ About/preview.png | Bin 0 -> 19498 bytes LICENSE | 11 + Languages/English/Keyed/Translations.xml | 18 ++ Languages/Japanese/Keyed/Translations.xml | 18 ++ LoadFolders.xml | 14 + README.md | 8 + Source/CustomGUIStyles.cs | 121 +++++++ Source/FontLoader.cs | 110 +++++++ Source/FontPatches.cs | 160 ++++++++++ Source/Main.cs | 27 ++ Source/RimWorldFontReplacer.csproj | 287 +++++++++++++++++ Source/Settings.cs | 257 +++++++++++++++ omnisharp.json | 17 + rimworld-font-replacer.sln | 39 +++ 17 files changed, 1498 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 About/About.xml create mode 100644 About/preview.png create mode 100644 LICENSE create mode 100644 Languages/English/Keyed/Translations.xml create mode 100644 Languages/Japanese/Keyed/Translations.xml create mode 100644 LoadFolders.xml create mode 100644 README.md create mode 100644 Source/CustomGUIStyles.cs create mode 100644 Source/FontLoader.cs create mode 100644 Source/FontPatches.cs create mode 100644 Source/Main.cs create mode 100644 Source/RimWorldFontReplacer.csproj create mode 100644 Source/Settings.cs create mode 100644 omnisharp.json create mode 100644 rimworld-font-replacer.sln diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d61ca32 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,365 @@ +root = true + +# All files +[*] +indent_style = space +max_line_length = 80 + +# Xml files +[*.xml] +indent_size = 2 + +# C# files +[*.cs] + +#### Core EditorConfig Options #### + +# Indentation and spacing +indent_size = 4 +tab_width = 4 + +# New line preferences +end_of_line = crlf +insert_final_newline = true + +#### .NET Coding Conventions #### +[*.{cs,vb}] + +# Organize usings +dotnet_separate_import_directive_groups = true +dotnet_sort_system_directives_first = true +file_header_template = unset + +# this. and Me. preferences +dotnet_style_qualification_for_event = false:silent +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_property = false:silent + +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent + +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent + +# Expression-level preferences +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_object_initializer = true:suggestion +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_prefer_auto_properties = true:suggestion +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion +dotnet_style_prefer_conditional_expression_over_return = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion + +# Field preferences +dotnet_style_readonly_field = true:warning + +# Parameter preferences +dotnet_code_quality_unused_parameters = all:suggestion + +# Suppression preferences +dotnet_remove_unnecessary_suppression_exclusions = none + +#### C# Coding Conventions #### +[*.cs] + +# var preferences +csharp_style_var_elsewhere = false:silent +csharp_style_var_for_built_in_types = false:silent +csharp_style_var_when_type_is_apparent = false:silent + +# Expression-bodied members +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_lambdas = true:suggestion +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent + +# Pattern matching preferences +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_prefer_not_pattern = true:suggestion +csharp_style_prefer_pattern_matching = true:silent +csharp_style_prefer_switch_expression = true:suggestion + +# Null-checking preferences +csharp_style_conditional_delegate_call = true:suggestion + +# Modifier preferences +csharp_prefer_static_local_function = true:warning +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent + +# Code-block preferences +csharp_prefer_braces = true:silent +csharp_prefer_simple_using_statement = true:suggestion + +# Expression-level preferences +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent + +# 'using' directive preferences +csharp_using_directive_placement = outside_namespace:silent + +#### C# Formatting Rules #### + +# New line preferences +csharp_new_line_before_catch = true +csharp_new_line_before_else = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_open_brace = all +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = true +csharp_indent_labels = one_less_than_current +csharp_indent_switch_labels = true + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false + +# Wrapping preferences +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = true + +#### Naming styles #### +[*.{cs,vb}] + +# Naming rules + +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion +dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces +dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase + +dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion +dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters +dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase + +dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods +dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties +dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.events_should_be_pascalcase.symbols = events +dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion +dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables +dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase + +dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion +dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants +dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase + +dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion +dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters +dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase + +dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields +dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion +dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields +dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase + +dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion +dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields +dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase + +dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields +dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields +dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields +dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums +dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions +dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase + +dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase + +# Symbol specifications + +dotnet_naming_symbols.interfaces.applicable_kinds = interface +dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interfaces.required_modifiers = + +dotnet_naming_symbols.enums.applicable_kinds = enum +dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.enums.required_modifiers = + +dotnet_naming_symbols.events.applicable_kinds = event +dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.events.required_modifiers = + +dotnet_naming_symbols.methods.applicable_kinds = method +dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.methods.required_modifiers = + +dotnet_naming_symbols.properties.applicable_kinds = property +dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.properties.required_modifiers = + +dotnet_naming_symbols.public_fields.applicable_kinds = field +dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal +dotnet_naming_symbols.public_fields.required_modifiers = + +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_fields.required_modifiers = + +dotnet_naming_symbols.private_static_fields.applicable_kinds = field +dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_static_fields.required_modifiers = static + +dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum +dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types_and_namespaces.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +dotnet_naming_symbols.type_parameters.applicable_kinds = namespace +dotnet_naming_symbols.type_parameters.applicable_accessibilities = * +dotnet_naming_symbols.type_parameters.required_modifiers = + +dotnet_naming_symbols.private_constant_fields.applicable_kinds = field +dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_constant_fields.required_modifiers = const + +dotnet_naming_symbols.local_variables.applicable_kinds = local +dotnet_naming_symbols.local_variables.applicable_accessibilities = local +dotnet_naming_symbols.local_variables.required_modifiers = + +dotnet_naming_symbols.local_constants.applicable_kinds = local +dotnet_naming_symbols.local_constants.applicable_accessibilities = local +dotnet_naming_symbols.local_constants.required_modifiers = const + +dotnet_naming_symbols.parameters.applicable_kinds = parameter +dotnet_naming_symbols.parameters.applicable_accessibilities = * +dotnet_naming_symbols.parameters.required_modifiers = + +dotnet_naming_symbols.public_constant_fields.applicable_kinds = field +dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal +dotnet_naming_symbols.public_constant_fields.required_modifiers = const + +dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal +dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static + +dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static + +dotnet_naming_symbols.local_functions.applicable_kinds = local_function +dotnet_naming_symbols.local_functions.applicable_accessibilities = * +dotnet_naming_symbols.local_functions.required_modifiers = + +# Naming styles + +dotnet_naming_style.pascalcase.required_prefix = +dotnet_naming_style.pascalcase.required_suffix = +dotnet_naming_style.pascalcase.word_separator = +dotnet_naming_style.pascalcase.capitalization = pascal_case + +dotnet_naming_style.ipascalcase.required_prefix = I +dotnet_naming_style.ipascalcase.required_suffix = +dotnet_naming_style.ipascalcase.word_separator = +dotnet_naming_style.ipascalcase.capitalization = pascal_case + +dotnet_naming_style.tpascalcase.required_prefix = T +dotnet_naming_style.tpascalcase.required_suffix = +dotnet_naming_style.tpascalcase.word_separator = +dotnet_naming_style.tpascalcase.capitalization = pascal_case + +dotnet_naming_style._camelcase.required_prefix = _ +dotnet_naming_style._camelcase.required_suffix = +dotnet_naming_style._camelcase.word_separator = +dotnet_naming_style._camelcase.capitalization = camel_case + +dotnet_naming_style.camelcase.required_prefix = +dotnet_naming_style.camelcase.required_suffix = +dotnet_naming_style.camelcase.word_separator = +dotnet_naming_style.camelcase.capitalization = camel_case + +dotnet_naming_style.s_camelcase.required_prefix = s_ +dotnet_naming_style.s_camelcase.required_suffix = +dotnet_naming_style.s_camelcase.word_separator = +dotnet_naming_style.s_camelcase.capitalization = camel_case + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e41f00a --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +*.cache +*.dtbcache.v2 +*.pdb +*.suo +.suo +*.testlog +*.user +*.ide + +**/.vs/Release +**/.vs +**/obj/Debug +**/obj +obj/ +.vs/ +bin +Assemblies/**/*.dll \ No newline at end of file diff --git a/About/About.xml b/About/About.xml new file mode 100644 index 0000000..13a9253 --- /dev/null +++ b/About/About.xml @@ -0,0 +1,29 @@ + + + RimWorld font replacer + rapture.party + 1.2.0 + +
  • 1.4
  • +
  • 1.5
  • +
  • 1.6
  • +
    + https://git.rapture.party/rapture-party/rimworld-font-replacer + +
  • + brrainz.harmony + Harmony + steam://url/CommunityFilePage/2009463077 + https://github.com/pardeike/HarmonyRimWorld/releases/latest +
  • +
    + +
  • brrainz.harmony
  • +
    + raptureparty.rimworldfontreplacer + +Replace the default UI font of Arial (:nauseated_face:) with any font installed on your system. It can also change the font sizes. + +Note for Mac users: Unity's font loader is bugged and cannot load fonts installed under </System/Library/Fonts/Supplemental>. You can symlink or copy fonts installed here to </Library/Fonts> to access them. + +
    \ No newline at end of file diff --git a/About/preview.png b/About/preview.png new file mode 100644 index 0000000000000000000000000000000000000000..cdbea4284c6fca4cbb382c5c9c4f18bb1201cd0b GIT binary patch literal 19498 zcmeEuWmp`|w(bA{f&@Zvog^fX;O-0r*AU!o@ZjzPgy5D0m*DOe+--0h+#LpYXSfgF z{?6I^oV)M+dw<;1Pj^pGt@W;2Ra2|Fd)50)$d}KOFEGh40RX@YX(=%!005Z~06=1R zjtl?*?#QRc0001zqmrZupmdl54gdgpOf;lT<>di%007`Q01fFC0Od&qfCK;_kpWQu zx&{E$kjVe@S`X>N-#W+u021rd89)dC08E1{0MGu`_X7N5lluGnU!Pwr+)S*j4V`Qq zUVm}0ea+6q$;1i(0G|DL_LmI;002;#j`Yv^(~2qq~ihp&O%(BlSOw{D&Pe6GtNl3p*zZTbtKUb`8O{&Q5}F-#%6J zpW8qDbh0r0XH7Pae>cm>)|&ZA!pzFV!u;=GCT1z0O2botW?*>qixYMF=XYuBdut5fRojiGJGRpYWK z@OIQv|88#iZt02$xa^pAw~!Ud_cdPE#jmrr_2EG1@n$3}EyyH(?dt#&)FRN z>fiLMKUs}!SF^c_E%Vxx6j;Nn%OPID36HQ`L(}Z{MLN1*FL0jn$bH1KX2C%g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L_-vT;S?l0@xqR)({E@PG zJbX47Cl?hPSJmj;slIKkPXXef+LH4l1USs99o;i@Y$E2WZJk}bnCFm=eM~PWV8o-5 zeLKnKBvzxrfRd1`>&gx&>N=g#pC_NEcKF~l4vr&=*5FB-B$DEA#H5+fm91e@j7-kl zuawUo7ixe;mpfFVngo1bX#ykJj*PF)a!opM{gWl}$+Arhq!VDPT|fm`?~+gF%bo)m~- zoM6kQm~%VsUe8*DDxnFj4#Qxe-=yOU!scpERsQdF*?C6|!wSh=7Cy_3thMdn_rD3cWoSEE`^*1? zgS=5cKYXxvhFm}wY?Jy%JEG+j;#-HU|Q7jt{eI1y} zU^6OR2rB$+Wc(P|KRA&b@O(g7>yuU;6&AD$mloT2CoECEhmviH&9_3oH^cz5Hb$r6 zqc>AXx>o@qHd=U=(-fgu<v9Au2YSCJPfd-bO!4_dUYteaq&F9nDPexsvR93MM$D4X~{XX)(^5XN2 z675Q@njbTj*tKYP*XGvY| zzk+jyE|;y{?f$R3J9j(&5v_($@>V!fZniUz){GmMyJ9;ZKN{(VdHsm|^ftKYQi v@17LY<~ovQvqsd^-Kb~j69QqWO#k_N**t1=kIdN%I`7KU)z4*}Q$iB}Pzxt5 literal 0 HcmV?d00001 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3c698a5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,11 @@ +Copyright 2026 rapture.party + +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. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “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 COPYRIGHT HOLDER OR CONTRIBUTORS 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. diff --git a/Languages/English/Keyed/Translations.xml b/Languages/English/Keyed/Translations.xml new file mode 100644 index 0000000..6cc11b6 --- /dev/null +++ b/Languages/English/Keyed/Translations.xml @@ -0,0 +1,18 @@ + + + Fonts + Choose Font + Font family + Font size + Tiny + Small + Medium + Planet + Not found + Unsupported + Choose {0} font + Current + Filter + Previews + Back in Jugust, we delivered oxygen equipment of the same size. 0123456789 $ + \ No newline at end of file diff --git a/Languages/Japanese/Keyed/Translations.xml b/Languages/Japanese/Keyed/Translations.xml new file mode 100644 index 0000000..8aaffa4 --- /dev/null +++ b/Languages/Japanese/Keyed/Translations.xml @@ -0,0 +1,18 @@ + + + フォント + フォントを選択 + フォントファミリー + フォントサイズ + 極小 + + + 惑星 + 見つかりません + 非対応 + {0}フォントを選択 + 現在 + 絞り込み + プレビュー + いろはにほへと ちりぬるを わかよたれそ 0123456789 $ + \ No newline at end of file diff --git a/LoadFolders.xml b/LoadFolders.xml new file mode 100644 index 0000000..6f00f8c --- /dev/null +++ b/LoadFolders.xml @@ -0,0 +1,14 @@ + + +
  • /
  • +
  • 1.4
  • +
    + +
  • /
  • +
  • 1.5
  • +
    + +
  • /
  • +
  • Current
  • +
    +
    \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6b5b248 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# RimWorld font replacer + +This mod allows you to replace the default RimWorld font of Arial (🤢) with any font installed on your system. + +## Dependencies + +- RimWorld 1.4+ +- Harmony ([GitHub](https://github.com/pardeike/HarmonyRimWorld), [Steam Workshop](https://steamcommunity.com/workshop/filedetails/?id=2009463077)) diff --git a/Source/CustomGUIStyles.cs b/Source/CustomGUIStyles.cs new file mode 100644 index 0000000..dbf06c8 --- /dev/null +++ b/Source/CustomGUIStyles.cs @@ -0,0 +1,121 @@ +using HarmonyLib; +using System.Reflection; +using Verse; +using UnityEngine; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace raptureparty.RimWorldFontReplacer +{ + [StaticConstructorOnStartup] + static class CustomGUIStyles + { + public static GUIStyle[] fontStyles; + + public static GUIStyle[] textFieldStyles; + + public static GUIStyle[] textAreaStyles; + + public static GUIStyle[] textAreaReadOnlyStyles; + + public static void UpdateFonts() + { + if (fontStyles != null) + { + fontStyles[0].font = FontLoader.FontTiny; + fontStyles[0].fontSize = FontLoader.FontTinySize; + fontStyles[1].font = FontLoader.FontSmall; + fontStyles[1].fontSize = FontLoader.FontSmallSize; + fontStyles[2].font = FontLoader.FontMedium; + fontStyles[2].fontSize = FontLoader.FontMediumSize; + } + if (textFieldStyles != null) + { + textFieldStyles[0].font = FontLoader.FontTiny; + textFieldStyles[0].fontSize = FontLoader.FontTinySize; + textFieldStyles[1].font = FontLoader.FontSmall; + textFieldStyles[1].fontSize = FontLoader.FontSmallSize; + textFieldStyles[2].font = FontLoader.FontMedium; + textFieldStyles[2].fontSize = FontLoader.FontMediumSize; + } + if (textAreaStyles != null) + { + textAreaStyles[0].font = FontLoader.FontTiny; + textAreaStyles[0].fontSize = FontLoader.FontTinySize; + textAreaStyles[1].font = FontLoader.FontSmall; + textAreaStyles[1].fontSize = FontLoader.FontSmallSize; + textAreaStyles[2].font = FontLoader.FontMedium; + textAreaStyles[2].fontSize = FontLoader.FontMediumSize; + } + if (textAreaReadOnlyStyles != null) + { + textAreaReadOnlyStyles[0].font = FontLoader.FontTiny; + textAreaReadOnlyStyles[0].fontSize = FontLoader.FontTinySize; + textAreaReadOnlyStyles[1].font = FontLoader.FontSmall; + textAreaReadOnlyStyles[1].fontSize = FontLoader.FontSmallSize; + textAreaReadOnlyStyles[2].font = FontLoader.FontMedium; + textAreaReadOnlyStyles[2].fontSize = FontLoader.FontMediumSize; + } + } + + public static void Create() + { + try + { + fontStyles = new GUIStyle[3]; + textFieldStyles = new GUIStyle[3]; + textAreaStyles = new GUIStyle[3]; + textAreaReadOnlyStyles = new GUIStyle[3]; + fontStyles[0] = new GUIStyle(GUI.skin.label); + fontStyles[0].font = FontLoader.FontTiny; + fontStyles[0].fontSize = FontLoader.FontTinySize; + fontStyles[1] = new GUIStyle(GUI.skin.label); + fontStyles[1].font = FontLoader.FontSmall; + fontStyles[1].fontSize = FontLoader.FontSmallSize; + fontStyles[1].contentOffset = new Vector2(0f, -1f); + fontStyles[2] = new GUIStyle(GUI.skin.label); + fontStyles[2].font = FontLoader.FontMedium; + fontStyles[2].fontSize = FontLoader.FontMediumSize; + for (int i = 0; i < textFieldStyles.Length; i++) + { + textFieldStyles[i] = new GUIStyle(GUI.skin.textField); + textFieldStyles[i].alignment = TextAnchor.MiddleLeft; + } + + textFieldStyles[0].font = FontLoader.FontTiny; + textFieldStyles[0].fontSize = FontLoader.FontTinySize; + textFieldStyles[1].font = FontLoader.FontSmall; + textFieldStyles[1].fontSize = FontLoader.FontSmallSize; + textFieldStyles[2].font = FontLoader.FontMedium; + textFieldStyles[2].fontSize = FontLoader.FontMediumSize; + for (int j = 0; j < textAreaStyles.Length; j++) + { + textAreaStyles[j] = new GUIStyle(textFieldStyles[j]) + { + fontSize = textFieldStyles[j].fontSize, + alignment = TextAnchor.UpperLeft, + wordWrap = true + }; + } + + for (int k = 0; k < textAreaReadOnlyStyles.Length; k++) + { + textAreaReadOnlyStyles[k] = new GUIStyle(textAreaStyles[k]); + textAreaReadOnlyStyles[k].fontSize = textAreaStyles[k].fontSize; + GUIStyle obj = textAreaReadOnlyStyles[k]; + obj.normal.background = null; + obj.active.background = null; + obj.onHover.background = null; + obj.hover.background = null; + obj.onFocused.background = null; + obj.focused.background = null; + } + } + catch (Exception ex) + { + Log.Message("Could not create GUI styles, " + ex.ToString()); + } + } + } +} diff --git a/Source/FontLoader.cs b/Source/FontLoader.cs new file mode 100644 index 0000000..764e8c7 --- /dev/null +++ b/Source/FontLoader.cs @@ -0,0 +1,110 @@ +using System; +using System.Linq; +using TMPro; +using UnityEngine; +using Verse; + +namespace raptureparty.RimWorldFontReplacer +{ + [StaticConstructorOnStartup] + class FontLoader + { + public static string TargetTinyFontName; + + public static string TargetSmallFontName; + + public static string TargetMediumFontName; + + public static string TargetPlanetFontName; + + public static int FontTinySize = 11; + + public static int FontSmallSize = 14; + + public static int FontMediumSize = 18; + + static private Font s_fontTiny; + static private string s_fontTinySearchedName; + static public bool FontTinyFound + { + get; private set; + } + + static private Font s_fontSmall; + static private string s_fontSmallSearchedName; + static public bool FontSmallFound + { + get; private set; + } + + static private Font s_fontMedium; + static private string s_fontMediumSearchedName; + static public bool FontMediumFound + { + get; private set; + } + + static private Font s_fontPlanet; + static private string s_fontPlanetSearchedName; + static public bool FontPlanetFound + { + get; private set; + } + + static public Font FontTiny + { + get + { + if (s_fontTinySearchedName != TargetTinyFontName) + { + s_fontTiny = Font.CreateDynamicFontFromOSFont(TargetTinyFontName, FontTinySize); + s_fontTinySearchedName = TargetTinyFontName; + FontTinyFound = Font.GetOSInstalledFontNames().Contains(TargetTinyFontName); + } + return FontTinyFound ? s_fontTiny : Text.fontStyles[0].font; + } + } + + static public Font FontSmall + { + get + { + if (s_fontSmallSearchedName != TargetSmallFontName) + { + s_fontSmall = Font.CreateDynamicFontFromOSFont(TargetSmallFontName, FontSmallSize); + s_fontSmallSearchedName = TargetSmallFontName; + FontSmallFound = Font.GetOSInstalledFontNames().Contains(TargetSmallFontName); + } + return FontSmallFound ? s_fontSmall : Text.fontStyles[1].font; + } + } + + static public Font FontMedium + { + get + { + if (s_fontMediumSearchedName != TargetMediumFontName) + { + s_fontMedium = Font.CreateDynamicFontFromOSFont(TargetMediumFontName, FontMediumSize); + s_fontMediumSearchedName = TargetMediumFontName; + FontMediumFound = Font.GetOSInstalledFontNames().Contains(TargetMediumFontName); ; + } + return FontMediumFound ? s_fontMedium : Text.fontStyles[2].font; + } + } + + static public Font FontPlanet + { + get + { + if (s_fontPlanetSearchedName != TargetPlanetFontName) + { + s_fontPlanet = Font.CreateDynamicFontFromOSFont(TargetPlanetFontName, Text.fontStyles[2].font.fontSize); // TODO: find correct size + s_fontPlanetSearchedName = TargetPlanetFontName; + FontPlanetFound = Font.GetOSInstalledFontNames().Contains(TargetPlanetFontName); ; + } + return FontPlanetFound ? s_fontPlanet : Text.fontStyles[2].font; // TODO: find correct size + } + } + } +} diff --git a/Source/FontPatches.cs b/Source/FontPatches.cs new file mode 100644 index 0000000..c3ca971 --- /dev/null +++ b/Source/FontPatches.cs @@ -0,0 +1,160 @@ +using HarmonyLib; +using System.Reflection; +using Verse; +using UnityEngine; +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld.Planet; +using TMPro; + +namespace raptureparty.RimWorldFontReplacer +{ + [HarmonyPatch] + static class Text_CurFontStyle_Patch + { + [HarmonyPatch(typeof(Text), nameof(Text.CurFontStyle), MethodType.Getter)] + public static bool Prefix(ref GUIStyle __result) + { + if (CustomGUIStyles.fontStyles == null) + { + CustomGUIStyles.Create(); + } + GUIStyle guistyle; + switch (Text.Font) + { + case GameFont.Tiny: + guistyle = CustomGUIStyles.fontStyles[0]; + break; + case GameFont.Small: + guistyle = CustomGUIStyles.fontStyles[1]; + break; + default: + case GameFont.Medium: + guistyle = CustomGUIStyles.fontStyles[2]; + break; + } + guistyle.alignment = Text.Anchor; + guistyle.wordWrap = Text.WordWrap; + __result = guistyle; + + return false; + } + } + + [HarmonyPatch] + static class Text_CurTextFieldStyle_Patch + { + [HarmonyPrefix] + [HarmonyPatch(typeof(Text), nameof(Text.CurTextFieldStyle), MethodType.Getter)] + static bool Prefix(ref GUIStyle __result) + { + if (CustomGUIStyles.fontStyles == null) + { + CustomGUIStyles.Create(); + } + GUIStyle guistyle; + switch (Text.Font) + { + case GameFont.Tiny: + guistyle = CustomGUIStyles.textFieldStyles[0]; + break; + case GameFont.Small: + guistyle = CustomGUIStyles.textFieldStyles[1]; + break; + default: + case GameFont.Medium: + guistyle = CustomGUIStyles.textFieldStyles[2]; + break; + } + __result = guistyle; + + return false; + } + } + + [HarmonyPatch] + static class Text_CurTextAreaStyle_Patch + { + [HarmonyPatch(typeof(Text), nameof(Text.CurTextAreaStyle), MethodType.Getter)] + static bool Prefix(ref GUIStyle __result) + { + if (CustomGUIStyles.fontStyles == null) + { + CustomGUIStyles.Create(); + } + GUIStyle guistyle; + switch (Text.Font) + { + case GameFont.Tiny: + guistyle = CustomGUIStyles.textAreaStyles[0]; + break; + case GameFont.Small: + guistyle = CustomGUIStyles.textAreaStyles[1]; + break; + default: + case GameFont.Medium: + guistyle = CustomGUIStyles.textAreaStyles[2]; + break; + } + __result = guistyle; + + return false; + } + } + + + [HarmonyPatch] + static class Text_CurTextAreaReadOnlyStyle_Patch + { + [HarmonyPatch(typeof(Text), nameof(Text.CurTextAreaReadOnlyStyle), MethodType.Getter)] + static bool Prefix(ref GUIStyle __result) + { + if (CustomGUIStyles.fontStyles == null) + { + CustomGUIStyles.Create(); + } + GUIStyle guistyle; + switch (Text.Font) + { + case GameFont.Tiny: + guistyle = CustomGUIStyles.textAreaReadOnlyStyles[0]; + break; + case GameFont.Small: + guistyle = CustomGUIStyles.textAreaReadOnlyStyles[1]; + break; + default: + case GameFont.Medium: + guistyle = CustomGUIStyles.textAreaReadOnlyStyles[2]; + break; + } + __result = guistyle; + + return false; + } + } + + [HarmonyPatch] + static class WorldFeatureTextMesh_TextMeshLegacy_Patch + { + [HarmonyPatch(typeof(WorldFeatureTextMesh_Legacy), nameof(WorldFeatureTextMesh_Legacy.Init))] + public static void Postfix(ref TextMesh ___textMesh) + { + Log.Message("Patching TextMesh init"); + ___textMesh.font = FontLoader.FontMedium; + } + } + + [HarmonyPatch] + static class WorldFeatureTextMesh_TextMeshPro_Patch + { + [HarmonyPatch(typeof(WorldFeatureTextMesh_TextMeshPro), nameof(WorldFeatureTextMesh_TextMeshPro.Init))] + public static void Postfix(ref TextMeshPro ___textMesh) + { + Log.Message("Patching TextMeshPro init"); + TMP_FontAsset asset = TMP_FontAsset.CreateFontAsset(FontLoader.FontPlanet); + ___textMesh.font = asset; + ___textMesh.UpdateFontAsset(); + } + } +} diff --git a/Source/Main.cs b/Source/Main.cs new file mode 100644 index 0000000..77ff44d --- /dev/null +++ b/Source/Main.cs @@ -0,0 +1,27 @@ +using HarmonyLib; +using System.Reflection; +using Verse; +using UnityEngine; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace raptureparty.RimWorldFontReplacer +{ + [StaticConstructorOnStartup] + class RimWorldFontReplacer : Mod + { + public RimWorldFontReplacer(ModContentPack content) : base(content) + { + base.GetSettings(); + var inst = new Harmony("rimworld.raptureparty.RimWorldFontReplacer"); + inst.PatchAll(); + } + + public void Save() => LoadedModManager.GetMod().GetSettings().Write(); + + public override string SettingsCategory() => "RimWorld Font Replacer"; + + public override void DoSettingsWindowContents(Rect inRect) => Settings.Build(inRect); + } +} diff --git a/Source/RimWorldFontReplacer.csproj b/Source/RimWorldFontReplacer.csproj new file mode 100644 index 0000000..0a78a94 --- /dev/null +++ b/Source/RimWorldFontReplacer.csproj @@ -0,0 +1,287 @@ + + + net472 + False + False + ../Assemblies/Current + false + None + + + + + /Applications/RimWorld.app/Contents/Resources/Data/Managed + /Applications/RimWorld.app/Mods/HarmonyMod/Current/Assemblies + + + + $(HarmonyAssemblies)/0Harmony.dll + False + + + $(RimWorldManaged)\Assembly-CSharp.dll + False + + + + + + + + + $(RimWorldManaged)\Unity.TextMeshPro.dll + False + + + $(RimWorldManaged)\UnityEngine.dll + False + + + $(RimWorldManaged)\UnityEngine.AccessibilityModule.dll + False + + + $(RimWorldManaged)\UnityEngine.AIModule.dll + False + + + $(RimWorldManaged)\UnityEngine.AndroidJNIModule.dll + False + + + $(RimWorldManaged)\UnityEngine.AnimationModule.dll + False + + + $(RimWorldManaged)\UnityEngine.ARModule.dll + False + + + $(RimWorldManaged)\UnityEngine.AssetBundleModule.dll + False + + + $(RimWorldManaged)\UnityEngine.AudioModule.dll + False + + + $(RimWorldManaged)\UnityEngine.ClothModule.dll + False + + + $(RimWorldManaged)\UnityEngine.ClusterInputModule.dll + False + + + $(RimWorldManaged)\UnityEngine.ClusterRendererModule.dll + False + + + $(RimWorldManaged)\UnityEngine.CoreModule.dll + False + + + $(RimWorldManaged)\UnityEngine.CrashReportingModule.dll + False + + + $(RimWorldManaged)\UnityEngine.DirectorModule.dll + False + + + $(RimWorldManaged)\UnityEngine.DSPGraphModule.dll + False + + + $(RimWorldManaged)\UnityEngine.GameCenterModule.dll + False + + + $(RimWorldManaged)\UnityEngine.GridModule.dll + False + + + $(RimWorldManaged)\UnityEngine.HotReloadModule.dll + False + + + $(RimWorldManaged)\UnityEngine.ImageConversionModule.dll + False + + + $(RimWorldManaged)\UnityEngine.IMGUIModule.dll + False + + + $(RimWorldManaged)\UnityEngine.InputLegacyModule.dll + False + + + $(RimWorldManaged)\UnityEngine.InputModule.dll + False + + + $(RimWorldManaged)\UnityEngine.JSONSerializeModule.dll + False + + + $(RimWorldManaged)\UnityEngine.LocalizationModule.dll + False + + + $(RimWorldManaged)\UnityEngine.ParticleSystemModule.dll + False + + + $(RimWorldManaged)\UnityEngine.PerformanceReportingModule.dll + False + + + $(RimWorldManaged)\UnityEngine.Physics2DModule.dll + False + + + $(RimWorldManaged)\UnityEngine.PhysicsModule.dll + False + + + $(RimWorldManaged)\UnityEngine.ProfilerModule.dll + False + + + $(RimWorldManaged)\UnityEngine.ScreenCaptureModule.dll + False + + + $(RimWorldManaged)\UnityEngine.SharedInternalsModule.dll + False + + + $(RimWorldManaged)\UnityEngine.SpriteMaskModule.dll + False + + + $(RimWorldManaged)\UnityEngine.SpriteShapeModule.dll + False + + + $(RimWorldManaged)\UnityEngine.StreamingModule.dll + False + + + $(RimWorldManaged)\UnityEngine.SubstanceModule.dll + False + + + $(RimWorldManaged)\UnityEngine.TerrainModule.dll + False + + + $(RimWorldManaged)\UnityEngine.TerrainPhysicsModule.dll + False + + + $(RimWorldManaged)\UnityEngine.TextRenderingModule.dll + False + + + $(RimWorldManaged)\UnityEngine.TilemapModule.dll + False + + + $(RimWorldManaged)\UnityEngine.TLSModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UI.dll + False + + + $(RimWorldManaged)\UnityEngine.UIElementsModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UIModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UmbraModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UnityAnalyticsModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UnityConnectModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UnityTestProtocolModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UnityWebRequestAssetBundleModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UnityWebRequestAudioModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UnityWebRequestModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UnityWebRequestTextureModule.dll + False + + + $(RimWorldManaged)\UnityEngine.UnityWebRequestWWWModule.dll + False + + + $(RimWorldManaged)\UnityEngine.VehiclesModule.dll + False + + + $(RimWorldManaged)\UnityEngine.VFXModule.dll + False + + + $(RimWorldManaged)\UnityEngine.VideoModule.dll + False + + + $(RimWorldManaged)\UnityEngine.VRModule.dll + False + + + $(RimWorldManaged)\UnityEngine.WindModule.dll + False + + + $(RimWorldManaged)\UnityEngine.XRModule.dll + False + + + + + + + + + + + + + + + + + + diff --git a/Source/Settings.cs b/Source/Settings.cs new file mode 100644 index 0000000..9ce7dfa --- /dev/null +++ b/Source/Settings.cs @@ -0,0 +1,257 @@ +using UnityEngine; +using Verse; +using System; +using HarmonyLib; +using System.Collections.Generic; +using System.Reflection; +using UnityEngine.UI; +using System.IO; + +namespace raptureparty.RimWorldFontReplacer +{ + + public class FontListDialog : Window + { + protected Vector2 scrollPosition = Vector2.zero; + + protected string[] _fonts = new string[0]; + + protected float bottomAreaHeight; + + protected string _filterText = ""; + + private string _prevFilterText = null; + + public uint FontIndex = 0; + + public FontListDialog() + { + doCloseButton = true; + doCloseX = true; + forcePause = true; + absorbInputAroundWindow = true; + closeOnAccept = false; + } + + public override void PreOpen() + { + base.PreOpen(); + _fonts = Font.GetOSInstalledFontNames(); + } + + public override void PostClose() + { + base.PostClose(); + } + + private string CurrentFontName + { + get + { + switch (FontIndex) + { + case 0: return FontLoader.TargetTinyFontName; + case 1: return FontLoader.TargetSmallFontName; + case 2: return FontLoader.TargetMediumFontName; + case 3: return FontLoader.TargetPlanetFontName; + default: return ""; + } + } + } + + private string FontTypeLabel + { + get + { + switch (FontIndex) + { + case 0: return "RWFR.Tiny".Translate(); + case 1: return "RWFR.Small".Translate(); + case 2: return "RWFR.Medium".Translate(); + case 3: return "RWFR.Planet".Translate(); + default: return ""; + } + } + } + + public override void DoWindowContents(Rect inRect) + { + float y = inRect.y; + + // Title + Verse.Text.Font = GameFont.Medium; + Widgets.Label(new Rect(inRect.x, y, inRect.width, 32f), "RWFR.ChooseFont_For".Translate(FontTypeLabel)); + Verse.Text.Font = GameFont.Small; + y += 36f; + + // Current selection + string current = CurrentFontName; + if (!string.IsNullOrEmpty(current)) + { + GUI.color = new Color(0.7f, 0.7f, 0.7f); + Widgets.Label(new Rect(inRect.x, y, inRect.width, 24f), "RWFR.Current".Translate() + ": " + current); + GUI.color = Color.white; + y += 26f; + } + + // Filter box + Widgets.Label(new Rect(inRect.x, y + 2f, 60f, 28f), "RWFR.Filter".Translate()); + string newFilter = Widgets.TextField(new Rect(inRect.x + 64f, y, inRect.width - 64f, 28f), _filterText); + if (newFilter != _prevFilterText) + { + scrollPosition = Vector2.zero; + _prevFilterText = newFilter; + } + _filterText = newFilter; + y += 34f; + + // Build filtered list + string[] filtered = string.IsNullOrEmpty(_filterText) + ? _fonts + : System.Array.FindAll(_fonts, f => f.IndexOf(_filterText, StringComparison.OrdinalIgnoreCase) >= 0); + + float listHeight = filtered.Length * 36f; + Rect outRect = new Rect(inRect.x, y, inRect.width, inRect.height - (y - inRect.y) - bottomAreaHeight - 50f); + Rect viewRect = new Rect(0f, 0f, outRect.width - 16f, listHeight); + + Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect, true); + + for (int i = 0; i < filtered.Length; i++) + { + bool isSelected = filtered[i] == current; + if (isSelected) + GUI.color = new Color(0.8f, 1f, 0.8f); + + if (Widgets.ButtonText(new Rect(0f, i * 36f, viewRect.width, 26f), filtered[i])) + { + switch (FontIndex) + { + case 0: FontLoader.TargetTinyFontName = filtered[i]; break; + case 1: FontLoader.TargetSmallFontName = filtered[i]; break; + case 2: FontLoader.TargetMediumFontName = filtered[i]; break; + case 3: FontLoader.TargetPlanetFontName = filtered[i]; break; + } + Close(); + } + + if (isSelected) + GUI.color = Color.white; + } + + Widgets.EndScrollView(); + } + } + + class Settings : ModSettings + { + public static Vector2 scrollPosition = Vector2.zero; + + private static string s_fontTinySizeBuffer = FontLoader.FontTinySize.ToString(); + private static string s_fontSmallSizeBuffer = FontLoader.FontSmallSize.ToString(); + private static string s_fontMediumSizeBuffer = FontLoader.FontMediumSize.ToString(); + + public static void Build(Rect inRect) + { + + inRect.yMin += 15f; + inRect.yMax -= 15f; + + var defaultColumnWidth = inRect.width - 50; + Listing_Standard list = new Listing_Standard() { ColumnWidth = defaultColumnWidth }; + + var outRect = new Rect(inRect.x, inRect.y, inRect.width, inRect.height); + var scrollRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + 200); + Widgets.BeginScrollView(outRect, ref scrollPosition, scrollRect, true); + + list.Begin(scrollRect); + + list.Label("RWFR.Fonts".Translate()); + list.GapLine(); + + list.Label("RWFR.Tiny".Translate()); + list.Indent(); + FontLoader.TargetTinyFontName = list.TextEntryLabeled("RWFR.Font_family".Translate(), FontLoader.TargetTinyFontName, 1); + list.TextFieldNumericLabeled("RWFR.Font_size".Translate(), ref FontLoader.FontTinySize, ref s_fontTinySizeBuffer, 1); + if (list.ButtonTextLabeled("", "RWFR.ChooseFont".Translate())) + { + var selector = new FontListDialog { FontIndex = 0 }; + Find.WindowStack.Add(selector); + } + list.Label(FontLoader.FontTinyFound ? "" : (string)"RWFR.Not_found".Translate()); + list.Outdent(); + + list.Label("RWFR.Small".Translate()); + list.Indent(); + FontLoader.TargetSmallFontName = list.TextEntryLabeled("RWFR.Font_family".Translate(), FontLoader.TargetSmallFontName, 1); + list.TextFieldNumericLabeled("RWFR.Font_size".Translate(), ref FontLoader.FontSmallSize, ref s_fontSmallSizeBuffer, 1); + if (list.ButtonTextLabeled("", "RWFR.ChooseFont".Translate())) + { + var selector = new FontListDialog { FontIndex = 1 }; + Find.WindowStack.Add(selector); + } + list.Label(FontLoader.FontSmallFound ? "" : (string)"RWFR.Not_found".Translate()); + list.Outdent(); + + list.Label("RWFR.Medium".Translate()); + list.Indent(); + FontLoader.TargetMediumFontName = list.TextEntryLabeled("RWFR.Font_family".Translate(), FontLoader.TargetMediumFontName, 1); + list.TextFieldNumericLabeled("RWFR.Font_size".Translate(), ref FontLoader.FontMediumSize, ref s_fontMediumSizeBuffer, 1); + if (list.ButtonTextLabeled("", "RWFR.ChooseFont".Translate())) + { + var selector = new FontListDialog { FontIndex = 2 }; + Find.WindowStack.Add(selector); + } + list.Label(FontLoader.FontMediumFound ? "" : (string)"RWFR.Not_found".Translate()); + list.Outdent(); + + list.Gap(12f); + list.Label("RWFR.Previews".Translate()); + list.GapLine(); + + string previewText = "RWFR.Preview_text".Translate(); + + list.Label("RWFR.Tiny".Translate(), 28f); + list.Indent(); + if (CustomGUIStyles.fontStyles != null) + { + float h = Mathf.Max(FontLoader.FontTinySize, 12) + 10f; + GUI.Label(list.GetRect(h), previewText, CustomGUIStyles.fontStyles[0]); + } + list.Outdent(); + + list.Label("RWFR.Small".Translate(), 28f); + list.Indent(); + if (CustomGUIStyles.fontStyles != null) + { + float h = Mathf.Max(FontLoader.FontSmallSize, 12) + 10f; + GUI.Label(list.GetRect(h), previewText, CustomGUIStyles.fontStyles[1]); + } + list.Outdent(); + + list.Label("RWFR.Medium".Translate(), 28f); + list.Indent(); + if (CustomGUIStyles.fontStyles != null) + { + float h = Mathf.Max(FontLoader.FontMediumSize, 12) + 10f; + GUI.Label(list.GetRect(h), previewText, CustomGUIStyles.fontStyles[2]); + } + list.Outdent(); + + list.End(); + Widgets.EndScrollView(); + CustomGUIStyles.UpdateFonts(); + } + + public override void ExposeData() + { + base.ExposeData(); + Scribe_Values.Look(ref FontLoader.FontTinySize, "fontSizeTiny", 11); + Scribe_Values.Look(ref FontLoader.FontSmallSize, "fontSizeSmall", 14); + Scribe_Values.Look(ref FontLoader.FontMediumSize, "fontSizeMedium", 18); + Scribe_Values.Look(ref FontLoader.TargetTinyFontName, "fontNameTiny", "Helvetica"); + Scribe_Values.Look(ref FontLoader.TargetSmallFontName, "fontNameSmall", "Helvetica"); + Scribe_Values.Look(ref FontLoader.TargetMediumFontName, "fontNameMedium", "Helvetica"); + Scribe_Values.Look(ref FontLoader.TargetPlanetFontName, "fontNamePlanet", "Helvetica"); + } + } +} diff --git a/omnisharp.json b/omnisharp.json new file mode 100644 index 0000000..b29cc87 --- /dev/null +++ b/omnisharp.json @@ -0,0 +1,17 @@ +{ + "fileOptions": { + "systemExcludeSearchPatterns": [ + "**/node_modules/**/*", + "**/bin/**/*", + "**/obj/**/*" + ], + "excludeSearchPatterns": [] + }, + "msbuild": { + "enabled": true + }, + "FormattingOptions": { + "EnableEditorConfigSupport": true, + "OrganizeImports": true + } +} \ No newline at end of file diff --git a/rimworld-font-replacer.sln b/rimworld-font-replacer.sln new file mode 100644 index 0000000..6b85ce9 --- /dev/null +++ b/rimworld-font-replacer.sln @@ -0,0 +1,39 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{B8EFCA5F-814F-285C-A8CB-F00F14650265}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RimWorldFontReplacer", "Source\RimWorldFontReplacer.csproj", "{FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Debug|x64.ActiveCfg = Debug|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Debug|x64.Build.0 = Debug|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Debug|x86.ActiveCfg = Debug|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Debug|x86.Build.0 = Debug|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Release|Any CPU.Build.0 = Release|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Release|x64.ActiveCfg = Release|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Release|x64.Build.0 = Release|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Release|x86.ActiveCfg = Release|Any CPU + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {FEDB45A9-FE14-4856-BEC0-0FF75B120BE6} = {B8EFCA5F-814F-285C-A8CB-F00F14650265} + EndGlobalSection +EndGlobal