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

Is it possible to change certain font? #18

Open
xarthurx opened this issue Jul 17, 2015 · 3 comments
Open

Is it possible to change certain font? #18

xarthurx opened this issue Jul 17, 2015 · 3 comments

Comments

@xarthurx
Copy link

Hi, a great package, almost all symbols are shown correctly.

I used to use https://github.com/tumashu/chinese-fonts-setup to set up Chinese fonts.
However, it cannot set symbols correctly.

But when using unicode-fonts, symbols are all right but lack two features that the above package provided:

  1. The ability to change fonts.
  2. The correct width of alignment (1 Chinese char = 2 latin char)

Is there is way to do these two functions inside this package?

@rolandwalker
Copy link
Owner

Hi! Awesome link!

I really want to combine that alignment functionality into unicode-fonts.el. It's going to take me a little bit to learn it because of not knowing how to read what I am looking at. I might need help.

As for changing the fonts, yes, unicode-fonts.el lets you do that, though it is too difficult and I need to make it easier.

If you type

  • M-x customize-variable RET unicode-fonts-block-font-mapping RET

then a giant customization buffer appears that contains all the block-to-font mappings. Each block shows the order of its preferred font.

So, if you scroll down that buffer until you find block "CJK Unified Ideographs", and press the INS button next to the first item, you can add a new font in the first position. Go back to the top of the customization buffer, press the "Apply and Save" button. Now the font you entered is the preferred font for displaying "CJK Unified Ideographs".

Besides the fact that the customization buffer is too big and complicated, it can be difficult to know exactly the spelling of the font name that Emacs expects – and that spelling varies per platform. I generally just install the font, restart Emacs, and look at the output of (font-utils-list-names) to find the one I want.

If there are good Chinese fonts that are not listed inside unicode-fonts.el, let's also add those fonts to the library.

@xarthurx
Copy link
Author

Sorry for get back to this late.
Yes the font changing process is still painful.
The fonts are provided in the file, but it need a better way to switch between them.

@amosbird
Copy link

Is there a better way to set certain fonts other than modifying this huge alist?

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

No branches or pull requests

3 participants