Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native font names replacements related improvements #1085

Closed
wants to merge 4 commits into from

Conversation

kakurasan
Copy link
Contributor

@kakurasan kakurasan commented Aug 19, 2018

Fixes #781 and potential problems in fakejapanese* verbs.

  • Set proper locale when running regedit (w_register_font_replacement)
  • Change existing variable names in fakejapanese*
  • Unset local variables in fakejapanese*
  • Support native (non-English) font names in w_register_font_replacement() and pass native font names in fakejapanese*
  • Add native font name replacements in fakejapanese
  • Add Chinese and Korean native font name replacements

@kakurasan kakurasan force-pushed the native_font_names branch 4 times, most recently from 7b73fd5 to c269b6b Compare August 21, 2018 13:30
@bsjeon
Copy link
Contributor

bsjeon commented Dec 21, 2018

add_register_font_replacement_unicode.txt

The Unicode registry file makes the task simpler.

@kakurasan
Copy link
Contributor Author

Good idea, but unfortunately it doesn't work with dash (bash works). Could you fix that (and supersede this PR) ?

@bsjeon
Copy link
Contributor

bsjeon commented Dec 21, 2018

Replace "\xff\xfe" with "\377\376".

I hope this will be your work.

@kakurasan
Copy link
Contributor Author

I modified w_register_font_replacement() instead of adding w_register_font_replacement_unicode() because it's quite similar to w_register_font_replacement().

Now the implementation is locale-independent and w_register_font_replacement() supports native (non-English) font names.

src/winetricks Outdated
w_register_font_replacement()
{
_W_alias=$1
shift
_W_font=$1
# UTF-16 BOM (U+FEFF, "0xEF 0xBB 0xBF" in UTF-8)
printf "\357\273\277" | iconv -f utf8 -t utf16le > "$W_TMP"/_register-font-replacements.reg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like BSD doesn't support utf8/utf16le; it uses UTF-8/UTF-16LE (not sure what mac does, but that should be verified as well).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. This works on macOS:
iconv_test_macos

@austin987
Copy link
Contributor

I merged 3/4 commits, fakechinese now has a conflict that can be addressed as its own PR.

Sorry this took so long, I wasn't clear on how to test it before.

@austin987 austin987 closed this Mar 10, 2020
@kakurasan kakurasan deleted the native_font_names branch March 10, 2020 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chinese cannot be displayed correctly in the input field when using QQ
3 participants