UNPKG

victory-native

Version:

[![Victory Native](https://oss.nearform.com/api/banner?badge=victory&text=victory+native&bg=9c2f1e)](https://commerce.nearform.com/open-source/victory-native/)

9 lines (8 loc) 400 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getFontGlyphWidth = void 0; const getFontGlyphWidth = (text, font) => { var _a; return (_a = font === null || font === void 0 ? void 0 : font.getGlyphWidths(font.getGlyphIDs(text)).reduce((sum, value) => sum + value, 0)) !== null && _a !== void 0 ? _a : 0; }; exports.getFontGlyphWidth = getFontGlyphWidth;