0
我使用Xlabs字體管理和字體提供者增加字體大小 我在那得到了成功,但是隻有我面對的iPad的迷你無變化問題在字體大小。我用波紋管代碼,更改字體大小如何increace在iphone字體大小的iPad mini和iPad平板電腦
private const short InitialSize = 18;
/// <summary>
/// Finds the closest.
/// </summary>
/// <param name="name">The name.</param>
/// <param name="desiredHeight">Height of the desired.</param>
/// <returns>Font.</returns>
public Font FindClosest(string name, double desiredHeight)
{
var height = this.GetHeight(Font.OfSize(name, InitialSize));
var multiply = (int)((desiredHeight/height) * InitialSize);
var f1 = Font.OfSize(name, multiply);
var f2 = Font.OfSize(name, multiply + 1);
var h1 = this.GetHeight(f1);
var h2 = this.GetHeight(f2);
var d1 = Math.Abs(h1 - desiredHeight);
var d2 = Math.Abs(h2 - desiredHeight);
return d1 < d2 ? f1 : f2;
}
iPhone和iPad的字體大小是看起來很完美,但iPad的迷你字體大小看起來太小
是正確的代碼?