{"id":21189914,"url":"https://github.com/caphyon/ckrctxt","last_synced_at":"2025-07-10T02:32:15.360Z","repository":{"id":89048139,"uuid":"50996691","full_name":"Caphyon/ckrctxt","owner":"Caphyon","description":"Visual Studio RC Text Bounds Checker","archived":false,"fork":false,"pushed_at":"2016-02-15T07:56:12.000Z","size":399,"stargazers_count":11,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-02-27T14:05:42.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Caphyon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-03T11:57:50.000Z","updated_at":"2023-05-02T05:34:35.074Z","dependencies_parsed_at":"2023-05-02T05:34:35.005Z","dependency_job_id":null,"html_url":"https://github.com/Caphyon/ckrctxt","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Caphyon%2Fckrctxt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Caphyon%2Fckrctxt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Caphyon%2Fckrctxt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Caphyon%2Fckrctxt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Caphyon","download_url":"https://codeload.github.com/Caphyon/ckrctxt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225615230,"owners_count":17496942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T18:57:25.951Z","updated_at":"2024-11-20T18:57:26.624Z","avatar_url":"https://github.com/Caphyon.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"ckrctxt :: RC Text Bounds Checker\n=================================\n\n`ckrctxt` is a simple tool that can check if any static *text block* (single or multi line) from a Visual Studio [resource file (RC)][RC] doesn't fit on given rectangle **size**.\nOn application UI the text appears truncated or *clipped*.\n\nI assume most software developers write Win32 applications to be [High DPI][hidpi] aware.\nOtherwise, it would be immediately visible if an application is [not ready for High DPI][issues] because everything appears blury and text is pixelated.\n\nFrom all [High DPI issues][issues], this tool is a solution for the most subtle one: [Clipped UI elements or text][clipped].\n\nA dialog created with Visual Studio resource editor usually looks fine on standard DPI.\nHowever, after changing the Windows display DPI to other standard configuration (125%, 150%, 200% and up to 500% on Windows 10) you might notice that the full text doesn't fit anymore.\n\n`ckrctxt` tool was created to automatically detect such problems at build for [Advanced Installer][advinst].\n\n[advinst]: http://www.advancedinstaller.com/\n[hidpi]: https://msdn.microsoft.com/en-us/library/dd464646.aspx\n[issues]: https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266.aspx#appendix_c_common_high_dpi_issues\n[clipped]: https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266.aspx#clipped_ui_elements_or_text\n[RC]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa380599.aspx\n\n\n### Build automation\n\nAn integration into any build system will basically execute:\n\n\tckrctxt --file [path-to-project].rc\n\nPerformance: it can scan a RC file with 40k lines, from which 4.5k text blocks to analyse in just *~300ms*.\n\n\n### Command line options\n\n    Usage: ckrctxt [options]\n\n    Options:\n    -q, --quiet           no output, just return the counter\n    --no-header           do not show header for current DPI\n    -f, --file NAME       Resource Script file name or path\n\n\nExamples\n--------\n\nSingle line text found at 150% display DPI:\n\n    display dpi: 144|144 (150%)\n\n    Dialog ID: IDD_EDIT_BUILD\n    -------------------------------\n    15225: LTEXT \"Version:\"\n    - detected text size: (59,19)px\n    - detected rect size: (25,8)du -\u003e (56,19)px\n    + minimum required rectangle size: (26,8)du\n\n    15227: LTEXT \"Build:\"\n    - detected text size: (41,19)px\n    - detected rect size: (16,8)du -\u003e (36,19)px\n    + minimum required rectangle size: (18,8)du\n\n    Dialog ID: IDD_FORM_CREATE_FILE\n    -------------------------------\n    17156: CONTROL \"Create file with encoding:\"\n    - detected text size: (181,19)px\n    - detected rect size: (90,10)du -\u003e (178,24)px\n    + minimum required rectangle size: (93,10)du\n\nQuick indication: the *CONTROL* element on line *17156* from *IDD_FORM_CREATE_FILE* dialog should have *93du* width.\n\nMulti line text found at 150% display DPI:\n\n\tdisplay dpi: 144|144 (150%)\n\n    Dialog ID: IDD_WIZARD_INSTALL\n    -------------------------------\n    17246: CONTROL \"The XYZ will not be installed by default.\n                    The user can choose to install it from ...\n                    or by selecting ...\"\n    - detected text size: (377,52)px\n    - detected rect size: (267,29)du -\u003e (383,47)px\n    + minimum required rectangle size: (263,32)du  [MULTILINE]\n\nQuick indication: the *CONTROL* element on line *17246* from *IDD_WIZARD_INSTALL* dialog should be extended to four lines (*32du*).\n\nFull description:\n\n- the multi line text from this checkbox fits in a rectangle of (377,52) pixels\n- the rectangle of this *CONTROL* element is (267,29) dialog units, converted to pixels  this is (383,47)\n- the required text height is 52px, but the rectangle height is 47px\n- the solution is to modify the rectangle height to 52px, aproximated to 32du\n\n\nImplementation limits\n---------------------\n\nAt this time, the internal parser searches only for these text [elements][ID]:\n\n- `[LCR]TEXT`\n- `[DEF]PUSHBUTTON`\n- `CONTROL` (check, 3state, radio)\n- `RADIOBUTTON`\n\n[ID]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa381043.aspx\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaphyon%2Fckrctxt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaphyon%2Fckrctxt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaphyon%2Fckrctxt/lists"}