blockly > utils > dom > measureFontMetrics
الدالة utils.dom.measureFontMetrics()
قياس مقاييس الخط قيم الارتفاع والخط المرجعي.
Signature:
export declare function measureFontMetrics(text: string, fontSize: string, fontWeight: string, fontFamily: string): {
height: number;
baseline: number;
};
المعلمات
المعلمة |
النوع |
الوصف |
text |
سلسلة |
نص لقياس أبعاد الخط. |
fontSize |
سلسلة |
حجم الخط المراد استخدامه. |
fontWeight |
سلسلة |
عرض الخط المطلوب استخدامه. |
fontFamily |
سلسلة |
مجموعة الخطوط المُستخدمة. |
المرتجعات:
{ height: number; خط الأساس: رقم؛ }
قياسات الخطوط:
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-09-20 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-09-20 (حسب التوقيت العالمي المتفَّق عليه)"],[[["`measureFontMetrics` calculates the height and baseline of a given text based on its font size, weight, and family."],["It takes the text, font size, font weight, and font family as input and returns an object containing the height and baseline measurements."],["This function helps determine the dimensions of text elements for accurate positioning and rendering within Blockly applications."]]],[]]