Skip to content

H@H 客户端列表翻译后的布局优化 #1366

Closed

Description

@Lssg97

描述问题
H@H 客户端列表翻译后中英混排,文字不在同一行上。强迫症表示看着很难受 qwq
PS: 浏览器自带翻译不会出现这样的问题。

相关网址
e-hentai.org/hentaiathome.php

截图
Image

环境

  • 系统: Windows 11 / MacOS 13.5.2
  • 浏览器: Chrome 153.0.8010.47 64-bit
  • 插件版本: v3.4.9

Activity

  1. changed the title [-]请求 H@H 客户端列表翻译后的布局优化[/-] [+]H@H 客户端列表翻译后的布局优化[/+] on Sep 17, 2026
  2. OpportunityLiu commented on Sep 18, 2026

    @OpportunityLiu
    Collaborator
    Image 跟你的字体有关系
  3. Lssg97 commented on Sep 18, 2026

    @Lssg97
    Author

    跟你的字体有关系

    您好,
    我发现这个确实和字体有关,但是我从来没有更改过系统或浏览器的默认显示字体。而且经过我测试发现翻译后的文本字体受到 Chrome 浏览器的“设置-外观-自定义字体”中的 Sans-serif 字体样式影响。而貌似未经翻译的文本保留了原先的默认字体,无论怎么调整都无法修改。
    这是我调整一个夸张字体后的样子:

    Image

    而且如果不启用插件,直接用浏览器自带翻译,其对齐程度要优于插件翻译。

    Image
  4. Lssg97 commented on Sep 22, 2026

    @Lssg97
    Author

    跟你的字体有关系

    注意到根元素字体按如下字形匹配:

    Image

    因为 arial 和 helvetica 字体家族中均没有中文字符,因此所有中文回退为浏览器默认的 sans-serif 字体。

    可否在插件中整体替换字体栈,最简单的方式是去掉 arial 和 helvetica 家族,全部使用 sans-serif 字形?或者在前方添加中文字体家族?

    // @grant        GM_addStyle
    // @run-at       document-start
    
    (function() {
        'use strict';
        GM_addStyle(`
            :root {
                font-family: sans-serif;
            }
        `);
    })();
    
  5. OpportunityLiu commented on Sep 23, 2026

    @OpportunityLiu
    Collaborator

    copilot 这实现也太搞笑了,我完了手写一份吧

  6. added a commit that references this issue on Sep 24, 2026
    71fc9ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions