rmp icon indicating copy to clipboard operation
rmp copied to clipboard

广州及佛山地铁车站标示内字体异常的小

Open GitLxsr opened this issue 1 year ago • 5 comments

圖片 此图可以明显看到,佛山地铁内部的字体小了一圈 圖片 即使是普通站点也明显字体偏小

补充说明:这种情况和稍早更新前的广州地铁车站如出一辙,但广州地铁车站更新之后此bug就被修复了,可以考虑是否相关。 圖片

GitLxsr avatar Jun 07 '24 01:06 GitLxsr

您好,这似乎是Windows中的现象,等待加载完成即可。

28yfang avatar Jun 07 '24 01:06 28yfang

我在MacOS中无法复现该问题: Screenshot 2024-06-07 at 09 31 04

28yfang avatar Jun 07 '24 01:06 28yfang

嗨,多次刷新后有时能偶遇此种情况。我们正在考虑添加额外措施尽量避免此现象,敬请期待 :)

如果您能稳定复现此问题,欢迎留言具体复现步骤以及操作系统浏览器的版本。

thekingofcity avatar Jun 07 '24 02:06 thekingofcity

您好,经测试,多次刷新后会偶发字体偏小的问题,即使开启匿名模式打开也会。此外,采用火狐浏览器126.0.1版本,在开启匿名模式的情况下打开一个文件会稳定触发,刷新后则有时会解决。此问题涵盖广佛两地的换乘标识。 这是匿名模式下首先打开的样子: 圖片 圖片 圖片 刷新后则会: 圖片 其余部分正常,此处不再截图。

GitLxsr avatar Jun 10 '24 15:06 GitLxsr

我也遇到了这个问题,也反馈过了,好像还没有修复。 https://github.com/railmapgen/rmp/issues/735

lrm-com avatar Jul 18 '24 05:07 lrm-com

Hi @thekingofcity ,

The font size of the station numbers are incorrect due to the font is loaded after the font size being calculated.

To fix this issue, I suggest loading the font css before rendering any stations. If it's not achievable, I've just added a util functions to force update the station number font sizes.

https://railmapgen.github.io/svg-assets/?path=/story/utils-svg-assets-context--svg-asset-context-demo

Example usage:

const WrappingComponent = () => {
    return <SvgAssetsContextProvider>
        <MySVGComponents />
    </SvgAssetsContextProvider>
}

const MySVGComponents = () => {
    const { update } = useContext(SvgAssetsContext);

    useEffect(() => {
        // Load required font css
        document.fonts
            .load('12px Arial', 'ABCDEFG123456')
            .finally(() => setTimeout(update, 100));
    }, []);

    return <svg>
        <Stations />
        <Lines />
    </svg>
}

wongchito avatar Jan 11 '25 14:01 wongchito

嗨,文字都会覆盖站点的问题已在测试环境修复,欢迎体验 :)

thekingofcity avatar Jan 18 '25 14:01 thekingofcity

感谢您的等待,此问题已在版本 5.1.32 中被修复 :)

thekingofcity avatar Jan 20 '25 10:01 thekingofcity