decord/alpha/source/modules/screen/native/useScaledTextLineHeight.android.tsx

46 lines
1.7 KiB
TypeScript
Raw Normal View History

// Module ID: 9779
// Function ID: 9780
// Name: useScaledTextLineHeight
// Dependencies: [9780, 4862, 5484, 2]
2026-07-29 08:29:29 +00:00
// Exports: scaleLineHeight, scaleTextLineHeight, useScaledTextLineHeight
2026-07-20 16:05:17 +00:00
// Module 9779 (useScaledTextLineHeight)
import Text_Text from "Text/Text" /* 4862 */;
import useFontScale from "useFontScale" /* 5484 */;
import NativeFontModuleDefault from "NativeFontModule" /* 9780 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
2026-07-29 08:29:29 +00:00
const map = new Map();
let result = size.fileFinishedImporting("modules/screen/native/useScaledTextLineHeight.android.tsx");
2026-07-29 08:29:29 +00:00
export const scaleLineHeight = function scaleLineHeight(arg0) {
value = map.get(arg0);
2026-07-29 08:29:29 +00:00
if (null == value) {
const scaledHeightForText = NativeFontModuleDefault.getScaledHeightForText(arg0);
2026-07-29 08:29:29 +00:00
const result = map.set(arg0, scaledHeightForText);
value = scaledHeightForText;
}
return value;
};
2026-08-08 06:10:11 +00:00
export const scaleTextLineHeight = function scaleTextLineHeight(c10, fontScale) {
const lineHeight = Text_Text.TextStyleSheet[c10].lineHeight;
value = map.get(lineHeight);
2026-07-20 16:05:17 +00:00
if (null == value) {
const scaledHeightForText = NativeFontModuleDefault.getScaledHeightForText(lineHeight);
2026-07-20 16:05:17 +00:00
const result = map.set(lineHeight, scaledHeightForText);
value = scaledHeightForText;
2026-07-29 08:29:29 +00:00
}
return value;
};
2026-09-03 10:05:34 +00:00
export const useScaledTextLineHeight = function useScaledTextLineHeight(beginSearch) {
const fontScale = useFontScale.useFontScale();
const lineHeight = Text_Text.TextStyleSheet[beginSearch].lineHeight;
value = map.get(lineHeight);
2026-07-29 08:29:29 +00:00
if (null == value) {
const scaledHeightForText = NativeFontModuleDefault.getScaledHeightForText(lineHeight);
2026-07-29 08:29:29 +00:00
const result = map.set(lineHeight, scaledHeightForText);
value = scaledHeightForText;
2026-07-20 16:05:17 +00:00
}
return value;
};