In Google Sheets, is there a way to calculate the width, in pixels, of a piece of text given a font and a font size? Excel has a PixelWidth function, but I didn't find any equivalent function or script for Sheets.
My goal is to be able to compare lengths of translated sentences in a UI. For example, if the English sentence is "Hi", and the French translation is "Bonjour", I would like to calculate how much more space the translation will be using. The length of the string is not enough since fonts have different character widths. I would like to calculate it directly in Sheets to give translators an indication of if the sentence can fit in the UI element.