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

ルーラー上の数字フォントの幅が自動的に指定されるように LOGFONT 構造体の lfWidth メンバの値を 0 に変更 #505

Merged
merged 1 commit into from
Sep 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sakura_core/view/CRuler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void CRuler::DrawRulerBg(CGraphics& gr)
HFONT hFontOld;
memset_raw( &lf, 0, sizeof(lf) );
lf.lfHeight = 1 - pCommon->m_sWindow.m_nRulerHeight; // 2002/05/13 ai
lf.lfWidth = 5;
lf.lfWidth = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@beru beru Sep 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更前の固定値は…ルーラーの高さを標準設定値の 13 にした時にちょうど良い横幅って事なんでしょうか?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更前の挙動を見た感じ、
ルーラーの1目盛に収まるサイズを意識していたんではないかと思います。

標準フォントMS ゴシック 9ptの半角文字の幅は96dpiで6pxなので、
目盛線の太さ分1pxを引いて5pxということなのではないかと。

lf.lfEscapement = 0;
lf.lfOrientation = 0;
lf.lfWeight = 400;
Expand Down