Jump to content
Chinese-forums.com
Learn Chinese in China

Hanzisize Extension - Enlarge Chinese characters on any webpage


Recommended Posts

Site Sponsors:
Pleco for iPhone / Android iPhone & Android Chinese dictionary: camera & hand- writing input, flashcards, audio.
Study Chinese in Kunming 1-1 classes, qualified teachers and unique teaching methods in the Spring City.
Learn Chinese Characters Learn 2289 Chinese Characters in 90 Days with a Unique Flash Card System.
Hacking Chinese Tips and strategies for how to learn Chinese more efficiently
Popup Chinese Translator Understand Chinese inside any Windows application, website or PDF.
Chinese Grammar Wiki All Chinese grammar, organised by level, all in one place.

Tomsima

This is really great, thanks for sharing and the work put in. I can finally read Chinese news websites directly without having to put them through clunky reader add ons to get the text size up beyond ant-size!

  • Like 1
Link to post
Share on other sites
  • Members
Hanzisize Developer

 @TomsimaGlad you find it useful! Feel free to share any thoughts on how to make Hanzisize even better.

Link to post
Share on other sites
Demonic_Duck
3 hours ago, Tomsima said:

I can finally read Chinese news websites directly without having to put them through clunky reader add ons to get the text size up beyond ant-size!

 

You can also try Ctrl+plus and Ctrl+minus or Ctrl+mousewheel to change the text and UI size of a whole site. It doesn't specifically target Chinese text, and it sometimes breaks old or poorly designed sites, but it's the "simplest" solution in terms of not requiring plugins etc.

  • Like 1
Link to post
Share on other sites
  • Members
Hanzisize Developer

You certainly could use the browser zoom function, but this method is:

  1. less consistent (the number of times you have to click ctrl+plus depends on how small the text was originally)
  2. less precise (it is difficult to get the same result twice in a row with a single swipe of ctrl+mousewheel )
  3. more time consuming (it requires several clicks of ctrl+plus or several slow adjustments with ctrl+mousewheel to get to the desired zoom level)
  4. less controlled (zoom affects all elements on the page. Most of us don't need images to be enlarged when we are trying to read chinese text)

Hanzisize on the other hand:

  1. does not depend on initial font size when resizing text
  2. always resizes to the same font size once a desired language and font size are set
  3. only requires a single click or hotkey press to activate
  4. only resizes page elements that contain text of the selected language

 

Hanzisize not only resolves all of these problems, it is also free and open source, and doesn't collect or transmit any user data.

  • Like 1
Link to post
Share on other sites
  • Members
Hanzisize Developer
1 minute ago, tsitsi said:

Nice work! Xie xie!

不客氣!Glad you find it helpful.

Link to post
Share on other sites
Jan Finster

Thanks this is useful. I tried it on Lingq and really like that it is selective for Chinese and leaves the English words small

 

image.thumb.png.31f700bf50822d50149f233976346a6e.png

 

Edit: on second thought, it is a bit weird that the numbers are small...

 

image.thumb.png.a364175b9739b4fcdff7be5baff50385.png

  • Like 1
  • Helpful 1
Link to post
Share on other sites
Demonic_Duck
12 hours ago, Hanzisize Developer said:

Hanzisize not only resolves all of these problems, it is also free and open source, and doesn't collect or transmit any user data.

 

Yeah, it looks like a nice extension 👍🏻 I only mentioned the browser zoom option because @Tomsima's response suggested they maybe weren't aware of this feature (lots of folks aren't, and it's a really useful feature).

  • Like 2
Link to post
Share on other sites
  • Members
Hanzisize Developer
15 hours ago, Jan Finster said:

Thanks this is useful. I tried it on Lingq and really like that it is selective for Chinese and leaves the English words small

 

image.thumb.png.31f700bf50822d50149f233976346a6e.png

 

Edit: on second thought, it is a bit weird that the numbers are small...

 

image.thumb.png.a364175b9739b4fcdff7be5baff50385.png

@Jan FinsterCan you post a link to this page? I'd like to see how the html is organized in order to give this result.

Link to post
Share on other sites
  • Members
Hanzisize Developer

@Jan FinsterSorry, just realized you said it was on LingQ.

 

I can see how that might be a bit odd that numbers won't change size with the rest of the text.

I'm not sure if this is something that would be good to change or not, since the idea is to focus on resizing the things that people have trouble reading and leaving everything else as-is. I feel most people can identify numbers even when they are quite small, so I would probably err on the side of grouping them in with the "don't need to resize" text.

 

Any other thoughts you have on this would be appreciated.

Link to post
Share on other sites
imron

This is fantastic!

Have you measured the performance impact of doing those regexes over all text in the page?  I wonder if there's a way to hook in to the browser's multilanguage support (e.g. Firefox has a configuration setting where you can set different font sizes for different languages).

The only suggestions I have are:

1. Have a page on the website where I can test the plugin for the languages that I'm interested in, so after installing the addon, I can go to that page and it has text for each language intermixed with each other and I can play around with the settings to find what works well for me.

2. Make it easier to pay you.  I have a choice of either bitcoin (which would charge more in transactions fees than the amount I'd pay), or paying in units of 'cost of a cup of coffee` rather than an amount of my choosing.

  • Like 2
Link to post
Share on other sites
imron

Small bug:

Take a look at this post.  Increasing the text size with Hanzisize increases both the chinese and the english text.

Also, the resize hotkey doesn't seem to do anything (Firefox, macOS).

Link to post
Share on other sites
  • Members
Hanzisize Developer
4 hours ago, imron said:

This is fantastic!

Have you measured the performance impact of doing those regexes over all text in the page?  I wonder if there's a way to hook in to the browser's multilanguage support (e.g. Firefox has a configuration setting where you can set different font sizes for different languages).

The only suggestions I have are:

1. Have a page on the website where I can test the plugin for the languages that I'm interested in, so after installing the addon, I can go to that page and it has text for each language intermixed with each other and I can play around with the settings to find what works well for me.

2. Make it easier to pay you.  I have a choice of either bitcoin (which would charge more in transactions fees than the amount I'd pay), or paying in units of 'cost of a cup of coffee` rather than an amount of my choosing.

 

@imronThanks so much for your suggestions. 

 

  1. I have not done any sort of rigorous testing on the performance impact of the extension.  However, the question of performance is linked to the bug you mentioned in your second comment. This problem is less of a bug and more of a deliberate design decision made to reduce the amount of time required to resize text on complex webpages. Hanzisize works by running a regex test against every HTML element or <div> that contains a text node on the page. As soon as a <div> is found to have text of the desired language, it is tagged for resizing. In cases where there is text of multiple languages in a single <div>, it will all be resized. This is the behavior you notice on the post you linked above. However, although the English text that was next to the Chinese text was resized, you will notice English text elsewhere on the page was not. In my experience, this system although not ideal, has proven to be sufficiently fast as to not frustrate users, while also producing relatively few "false positives" of non-target language being resized.
     
  2. I was until now unaware that Firefox has the function that you described.  After experimenting with it a bit, I found it to be a bit unwieldy. One issue that I have found is that while it can resize text, it doesn't change the corresponding line-height. This causes text to start to overlap the text above and below it once it gets past a certain size. The function also seems a bit unreliable as I couldn't get it to change the Chinese font size in my post above. I will look into it more and see if I can learn anything that can make Hanzisize better.
     
  3. There is a test page here: https://rjpeterson.github.io/Hanzisize/src/test/testpage.html that you can use to test each language supported by the extension. I do like your suggestion of making it easily available from the Hanzisize webpage, so I will implement that soon. I will also put a simple Paypal link in the donation section as well. 😁
     
  4. For the hotkey problem, just to be clear, the language and font size settings carry over from the last time you set them so for example if the font size is set smaller than the current page's font size and you hit the hotkey, nothing will happen as the extension will never reduce your font size below what the page set it as originally. I don't have access to a mac so I have been unable to test Hanzisize on macOS. If you wouldn't mind, would you also open your Firefox extension hotkey options, tell me what hotkeys are available for Hanzisize, and see if changing them to another key combination has any effect?

-Ryan

  • Like 1
Link to post
Share on other sites
Jan Finster

I got this message when I used it on Lingq today:

"Warning: This page contains iframes. Hanzisize may not work properly."

 

It seems to work fine. 

(just want to let the developer know in case it is helpful)

Link to post
Share on other sites
markhavemann

Always nice to see tools being developed for Chinese. Seems like this will be useful for a lot of people.

 

I definitely wouldn't discourage you from developing this but I do have some thoughts:

 

I've also find myself frustrated by the tiny size of Chinese text online, but I usually resist the urge to resize text unless I really need to. If native speakers are able to recognize characters at those sizes without a problem, it seems like a skill that I should probably be working on too, at least at later levels but probably sooner rather than later since it's just another level of recognizing characters. 

 

Up-sizing text habitually is something that I worry would become a bit of crippling crutch (albiet a small one), and I've definitely found myself becoming comfortable with small text as I spend more time with it. It might be worth just powering through in the beginning so that you can consume content in it's "natural habitat".

Link to post
Share on other sites
  • Members
Hanzisize Developer
14 hours ago, Jan Finster said:

I got this message when I used it on Lingq today:

"Warning: This page contains iframes. Hanzisize may not work properly."

 

It seems to work fine. 

(just want to let the developer know in case it is helpful)

That behavior is expected. Some pages that contain iframes can prevent Hanzisize from working properly, hence the warning. Often you won't notice anything unusual, but the warning will still show just in case.

Link to post
Share on other sites
  • Members
Hanzisize Developer
8 hours ago, markhavemann said:

Always nice to see tools being developed for Chinese. Seems like this will be useful for a lot of people.

 

I definitely wouldn't discourage you from developing this but I do have some thoughts:

 

I've also find myself frustrated by the tiny size of Chinese text online, but I usually resist the urge to resize text unless I really need to. If native speakers are able to recognize characters at those sizes without a problem, it seems like a skill that I should probably be working on too, at least at later levels but probably sooner rather than later since it's just another level of recognizing characters. 

 

Up-sizing text habitually is something that I worry would become a bit of crippling crutch (albiet a small one), and I've definitely found myself becoming comfortable with small text as I spend more time with it. It might be worth just powering through in the beginning so that you can consume content in it's "natural habitat".

I have had the same thought myself in the past. However, in my last three years living in Taiwan, I have often noticed that whenever I catch a glimpse of a Taiwanese friend's phone, they often if not always have changed their settings so that text is displayed at a larger size than default. It doesn't matter what their age is, even college students will have their phones set up like this.

Perhaps your experience is different, but this is what I have found, and so I've stopped holding myself to a standard that not even native speakers abide by.

Link to post
Share on other sites
markhavemann
2 hours ago, Hanzisize Developer said:

I have had the same thought myself in the past. However, in my last three years living in Taiwan, I have often noticed that whenever I catch a glimpse of a Taiwanese friend's phone, they often if not always have changed their settings so that text is displayed at a larger size than default. It doesn't matter what their age is, even college students will have their phones set up like this.

I don't think I've noticed it in mainland China but I imagine that small traditional characters are probably a lot more trouble at smaller sizes because of the extra compexity.

Link to post
Share on other sites

Join the conversation

You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...