This is a DirectWrite font loader for ImGui v1.92.9b. It uses C++23 and may need some slight adjustments to fit your needs.
ImGui::GetIO().Fonts->SetFontLoader(ImDWriteCreateFontLoader());
ImDWriteAddFontFamily(ImGui::GetIO().Fonts, "Segoe UI");| -- Please use with care | |
| -- Find me: x.com/onghu | https://ruby.social/@onghu | https://bsky.app/profile/onghu.com | |
| Cleaning up the Shell Menu/ Shell Extension Menu | |
| - https://www.nirsoft.net/utils/shell_menu_view.html | |
| - https://www.nirsoft.net/utils/shexview.html | |
| Download and unzip to d:\apps\sys_utils | |
| Disabled: | |
| - DropboxCopyHook Class Yes Copy Hook Handler Dropbox Shell Extension 1.0.77.0 Dropbox Dropbox, Inc. No No No No No No C:\Program Files (x86)\Dropbox\Client\DropboxExt64.77.0.dll {FBC9D74C-AF55-4309-9FB2-C426E071637F} 2024-12-26 7:10:11 PM 2024-12-26 7:10:12 PM No Directory AC 466,320 No No | |
| - ContextMenuHandler Class Yes Context Menu Dropbox Shell Extension 1.0.77.0 Dropbox Dropbox, Inc. No No No No No No C:\Program Files (x86)\Dropbox\Client\DropboxExt64.77.0.dll {ECD97DE5-3C8F-4ACB-AEEE-CCAB78F7711C} 2024-12-26 7:10:11 PM 2024-12-26 7:10:12 PM No Directory\Background, *, .lnk, Directory, lnkfile AC 466,320 No No |
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
| // ref: http://www.codercorner.com/RadixSortRevisited.htm | |
| // http://stereopsis.com/radix.html | |
| // int/float: https://github.com/lshamis/FloatRadixSort | |
| // string: https://github.com/rantala/string-sorting/blob/master/src/msd_ce.cpp | |
| struct str { | |
| const char *str; | |
| const char *end; | |
| int len; | |
| }; |
| /* This code is an extension of the 'keyboard section' present in 'imgui_demo.cpp'. | |
| License is the same (MIT License AFAIK) | |
| */ | |
| #include <imgui_virtual_keyboard.h> | |
| namespace ImGui { | |
| // VirtualKeyboard Implementation | |
| const char** GetKeyboardLogicalLayoutNames() { |
| // only handles coplexity on top level, if you have a node with 1M children, you are out of luck | |
| // changes in clipped parts are not detected, so if somebody deleted nodes in clipped, scrollbar is not updated until user actually scrolls | |
| // scrolling and changes refresh the clipper == that part is as slow as no clipping at all | |
| // only single list in BeginChild/EndChild is tested | |
| struct TreeViewClipper { | |
| // persist | |
| float cursor_end = 0; | |
| float cursor_visible_start = 0; | |
| uint first_visible_index = 0; | |
| float last_scroll = 0; |
| // CC0 | |
| #define IMGUI_DEFINE_MATH_OPERATORS | |
| #include <imgui_internal.h> | |
| #define isdigit(c) (c >= '0' && c <= '9') | |
| namespace ImGui | |
| { | |
| float strToFloat (const char *s) // atof from minilibc |
| # | |
| # CMake build system for Dear ImGui | |
| # ================================= | |
| # | |
| # Build instructions: | |
| # 1. Install latest CMake | |
| # * Windows: https://cmake.org/download/ (Tick checkbox to place cmake in system PATH) | |
| # * Linux: from your favorite package manager | |
| # * MacOS: brew install cmake | |
| # 2. Open command prompt in directory containing "imgui" and "imgui_dev" folders |
| #pragma once | |
| // String tokenizing iterator | |
| // by Nathan Reed, 2020-08-06. Licensed CC0 https://creativecommons.org/publicdomain/zero/1.0/ | |
| // | |
| // Use it like: | |
| // | |
| // for (auto token : IterTokens(" Bird \t\tFish Dog Cat ")) | |
| // { | |
| // // token is a std::string_view pointing into the original string |
| #include <iostream> | |
| #include <assert.h> | |
| #include <vector> | |
| template<class T> | |
| struct Func{}; | |
| // std::func replacement without dynamic memory allocation (captures are limited to 48 bytes) | |
| // this could be extended to support captures >48 bytes... of course, with a bit more of logic | |
| // and some state. |