![]() That said, I think your algorithm is good enough, and fast enough for the use case you have in mind (and I've just verified that on my machine with my strange fonts, it's also very usable). Available for Desktop use Available for Electronic Doc use Available for Web use (Annual license) Purchase the desired number of. But that's what would be needed to do a proper job in all cases. I'd be hesitant to stick such a monster in the drawing code. ![]() ![]() Pragmata Pro Font: Roedy Green wrote, 'PragmataPro is an excellent programmer’s font from font designer Fabrizio Schiavi in Italy, the creator of the ea. something that goes through the font, extracts the ligatures, or takes a list from the user, and then uses some kind of hash trick to check if there's a match in the current string to be printed. Similar free fonts and alternative for Pragmata Pro - Letter Gothic Line, Crystal, M+ 2m regular, Sans I Am, M+ 1m regular, NK57MonospaceScRg-Regular, Share, Cousi. I don't think we can prevent people to shoot themselves in the foot on slow machines unless we go for something that's a bit heavier on data structures, e.g. Well, in any case, your new code is certainly no worse than the code I originally proposed. But for anything but a very short ligature string (I guess 2-4 characters), the bitmap is going to beat the memchr version because memchr contains a loop. Show what exactly? If you are wondering about memchr vs the bitmap approach, I can run a quick valgrind or something, if that helps. Bit compare trough array or bitmap equivalent is quick, comparing two strings is very CPU intensive. I am very cautious about searching trough lists in tight screen drawing loop. Please show that somewhere when you get time. Okay, with user-tunable ligature string (and the bitmap thing I proposed)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |