रिसर्च सर्वे: Blockly के साथ अपने अनुभव के बारे में हमें बताएं
सर्वे शुरू करें
ब्लॉकली > utils > डॉम > measureFontMetrics
utils.dom.measureFontMetrics() फ़ंक्शन
फ़ॉन्ट की मेट्रिक मेज़र करें. ऊंचाई और बेसलाइन वैल्यू.
हस्ताक्षर:
export declare function measureFontMetrics(text: string, fontSize: string, fontWeight: string, fontFamily: string): {
height: number;
baseline: number;
};
पैरामीटर
पैरामीटर |
टाइप |
ब्यौरा |
टेक्स्ट |
स्ट्रिंग |
वह टेक्स्ट जिसके फ़ॉन्ट डाइमेंशन को मेज़र करना है. |
fontSize |
स्ट्रिंग |
इस्तेमाल करने के लिए फ़ॉन्ट का साइज़. |
fontWeight |
स्ट्रिंग |
इस्तेमाल करने के लिए फ़ॉन्ट की मोटाई. |
fontFamily |
स्ट्रिंग |
इस्तेमाल करने के लिए फ़ॉन्ट फ़ैमिली. |
लौटाए जाने वाले प्रॉडक्ट:
{ height: number; बेसलाइन: नंबर; } पर स्विच करने के मकसद से, हमसे संपर्क करने के लिए धन्यवाद.
फ़ॉन्ट की माप.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-09-20 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2024-09-20 (UTC) को अपडेट किया गया."],[[["`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."]]],[]]