@mickpitkin92: This was discussed earlier on in the thread and the syntax we settled on for the font loading mechanism was specific enough that such a feature could be added.
Both Mac and Windows do provide APIs to load fonts into the current application (not globally) from memory rather than files however the issue comes from the script interaction part. Using font files gives an obvious (and unique!) key to use to load/unload/enumerate what has been done - the filename. If you can load a font from a sequence of bytes (rather than a file) then a key is a little harder to come by - the 'obvious' thing to use is the font name that comes from the font encoded in the sequence of bytes but that then means the engine needs to leverage a library that can parse out this information from the memory block; also it doesn't work in the case of multiple fonts being encoded in one block (which I believe can happen with TrueType-Collection files).
So, anyway, it is something that could be added; but at the moment it didn't seem worth the potentially significant extra cost - especially as you can just spit the data out to disk as a temporary file and load that way.
That being said, the current syntax was chosen so that this feature could be extended in the future - we have 'font file' (start using font file, stop using font file, fontFilesInUse); the memory loading facility could use the same syntax but just drop the 'file' adjective.
Integrating revFont
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark
Return to “Engine Contributors”
Jump to
- LiveCode Community
- ↳ Announcements
- ↳ Developer Services Marketplace
- ↳ User Groups and Events
- ↳ SoCal LiveCode Group
- ↳ Greater Toronto Area LiveCode Users Group
- ↳ Off-Topic
- ↳ Made With LiveCode
- Getting Started With LiveCode
- ↳ Getting Started with LiveCode - Complete Beginners
- ↳ Getting Started with LiveCode - Experienced Developers
- ↳ Converting to LiveCode
- ↳ App Building Course
- ↳ Simple Messages
- ↳ Calculator
- ↳ Notes
- ↳ Clock
- ↳ Web Browser
- ↳ Weather
- ↳ Compass
- ↳ Photos
- Developing With LiveCode
- ↳ Talking LiveCode
- ↳ Databases
- ↳ Games
- ↳ Internet
- ↳ Multimedia
- ↳ Software Engineering
- ↳ Version Control
- ↳ Feature Proposals
- ↳ Bug Triage
- ↳ Legacy Project: MetaCard
- Extending LiveCode
- ↳ Using Plugins for Customizing the LiveCode IDE
- ↳ Using Externals
- ↳ Making IDE Plugins
- ↳ Building Externals
- ↳ LiveCode Builder
- Platform Specific
- ↳ Windows
- ↳ Mac OS
- ↳ Linux
- ↳ iOS Deployment
- ↳ Android Deployment
- ↳ CGIs and the Server
- ↳ HTML5
- ↳ Raspberry Pi
- Academic Endeavors
- ↳ Teaching with LiveCode
- ↳ Research and Post Secondary
- ↳ LiveCode University
- ↳ Educational Outreach
- Livecode Open Source Archived Forum- closed to posting
- ↳ Engine Contributors
- ↳ IDE Contributors
- ↳ Documentation and Tutorials
- ↳ Brainstorms
- ↳ Community Projects
- ↳ rIDE
- Third Party Extension Support
- ↳ Marketing Your Products
- ↳ Animation Engine
- ↳ chartsEngine
- ↳ MobGUI
- ↳ lcTaskList
- ↳ SQL Yoga
- ↳ MergEXT
- ↳ Data Grid Helper
- ↳ idea2app and Coding School
- ↳ Admin Archive
- LiveCode Hosting
- Forum Archives
- ↳ Archived: Third Party Extension Support
- ↳ rTree
- ↳ rGrid
- ↳ Data Tree
- ↳ Archived: LiveCode Open Source
- ↳ LiveCode Global Jam
- ↳ Testing Support
- ↳ Archived: Academic Endeavors
- ↳ September Academy
- ↳ Summer School 2013
- ↳ Archived: Project Specific
- ↳ Business and Kiosks
- ↳ Digital Art and Portfolios