Paperfeed / LiuChan

A Chinese mouseover dictionary extension for Chrome
https://paperfeed.github.io/LiuChan
20 stars 11 forks source link

FR: User defined font style #5

Open manyfew opened 6 years ago

manyfew commented 6 years ago

Currently the font size of the pop-up is linked to the zoom level of the web page. It would be nice if the pop-up size could be fixed and independent of the web page zoom level, and also if the pop-up font size could be defined by the user. Maybe the hanzi, pinyin and definition font size and colour could be user defined, too. When the tone colors feature is enabled, the tone colors would override the user-defined default colors, where applicable.

Paperfeed commented 6 years ago

I might add custom font sizes later on. For now I've added an option to disable scaling on zoom though!

manyfew commented 6 years ago

I've check this feature. When disabled, I found the fonts looked too small on my Surface Pro 4 display, so I've left it enabled. I think linking it to zoom level is not the best idea because a website may use several font sizes, from tiny to huge. Users will zoom in and out to be able to make the website readable, but that doesn't guarantee the size of the pop-up text will be adequate, because the pop-up is not aware of the size of the text the user is looking at. So, if the mouse pointer is over an originally very small font, the user will zoom in until the font is big enough to read; meanwhile, the pop-up could look huge and take up one quarter of the screen!

Therefore, the main advantage of a pop-up with a fixed user-defined font is consistency. As a side effect, the pop-up translator also doubles as a text magnifier without having to manually zoom in to read text small text. This side effect is actually a huge workflow enhancement which a lot of people don't notice until they use a browser without the pop-up installed.

Paperfeed commented 6 years ago

I'm not sure I understand. So basically the default font size is too small right? I'll add customization for that then. Because when you disable scaling (which actually under the hood enables scaling - but it's scaling the pop-up to stay the original size haha) everything should be the original size.

Are you always browsing zoomed in?

On Dec 8, 2017 06:30, "Manuel Fernandez" notifications@github.com wrote:

I've check this feature. When disabled, I found the fonts looked too small on my Surface Pro 4 display, so I've left it enabled. I think linking it to zoom level is not the best idea because a website may use several font sizes, from tiny to huge. Users will zoom in and out to be able to make the website readable, but that doesn't guarantee the size of the pop-up text will be adequate, because the pop-up is not aware of the size of the text the user is looking at. So, if the mouse pointer is over an originally very small font, the user will zoom in until the font is big enough to read; meanwhile, the pop-up could look huge and take up one quarter of the screen!

Therefore, the main advantage of a pop-up with a fixed user-defined font is consistency. As a side effect, the pop-up translator also doubles as a text magnifier without having to manually zoom in to read text small text. This side effect is actually a huge workflow enhancement.

The problem is that a website can use many different font sizes. For example, a title may use a large font size, so you don't some websites use a very small font, but have

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Paperfeed/LiuChan/issues/5#issuecomment-350176594, or mute the thread https://github.com/notifications/unsubscribe-auth/ABj8V8haUMoLwwXRtcicy7uSdCynu3YZks5s-MmQgaJpZM4QR4tz .

manyfew commented 6 years ago

Usually well-designed websites don't need zooming and I usually browse at bewteen 100% and 120%, sometimes 140% on some crazy Chinese websites with tiny fonts. The problem is that on my computer the actual pop-up looks tiny. For example, the following screenshot shows Taobao at 100% zoom level, you can see the pop-up is very small (I'm deliberately showing you the whole screen so you can see really how small it is):

small popup

Paperfeed commented 6 years ago

Oh... that is pretty small yeah. Changing CSS stylesheets use em instead of px should make a difference (just noticed it was still using px). I'll push a little 'hot-fix' when I have them all converted.

On Fri, Dec 8, 2017 at 2:48 PM, Manuel Fernandez notifications@github.com wrote:

Usually well-designed websites don't need zooming and I usually browse at bewteen 100% and 120%, sometimes 140% on some crazy Chinese websites with tiny fonts. The problem is that on my computer the actual pop-up looks tiny. For example, the following screenshot shows Taobao at 100% zoom level, you can see the pop-up is very small (I'm deliberately showing you the whole screen so you can see really how small it is):

[image: small popup] https://user-images.githubusercontent.com/11704566/33768561-80ae7b60-dc61-11e7-8daf-8b199fe2ab13.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Paperfeed/LiuChan/issues/5#issuecomment-350267206, or mute the thread https://github.com/notifications/unsubscribe-auth/ABj8Vw81zfSx1-urz6-mnW5yv6GzfEteks5s-T4tgaJpZM4QR4tz .