We have a Japanese user reporting that a form size is truncated (smaller size, not all controls are shown) on his Japanese machine. In the windows form .designer.cs file, we have these settings:
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
Moreover, in the form ctor, we have some code that look like that to adjust the form size to the DPI. uThe japanese user has a regular DPI set o 96.
//
// Adjust Form Size from DPIRatio
//
var size = this.Size;
// dpiRatio is 1.0 if DPI is 96,
// dpiRatio is less than 1.0 if DPI higher than 96
var dpiRatio = DPIHelper.DPIRatio;
var newSize = new Size((int)(size.Width/dpiRatio), (int)(size.Height/dpiRatio));
this.MaximumSize = newSize;
this.MinimumSize = newSize;
this.Size = newSize;
I am sure that it comes from the different set of font on Japanese Windows but didn't find any guidance to follow to handle that on the web. Any idea?