You are viewing a single comment's thread. Return to all comments →
public static int designerPdfViewer(List<int> h, string word) { var maxHeight = 1; foreach(var c in word) { var alphabetIndex = GetAlphabetIndex(c); var characterHeight = h[alphabetIndex]; if(characterHeight > maxHeight) { maxHeight = characterHeight; } } return maxHeight * word.Length; } public static int GetAlphabetIndex(char character) { character = char.ToUpper(character); // Convert to uppercase for consistency return character - 'A'; // 'A' becomes 0, 'B' becomes 1, etc. }
Seems like cookies are disabled on this browser, please enable them to open this website
Designer PDF Viewer
You are viewing a single comment's thread. Return to all comments →