Comments (7)
Does your StartupBanners
class include a Development
property?
To see generated files you need to set the EmitCompilerGeneratedFiles
property in your project:
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
</PropertyGroup>
This will write a file to a location such as obj/Debug/net8.0/generated/MyProject.Lib.Common
.
Note that source generators don't write this file by default for performance reasons. The disk IO is avoidable.
from figgle.
Thanks for the quick response.
I do not have that in setting configured. I'll test that tomorrow.
So if the string is generated there, how is it usable as a reference in my source elsewhere? Or is the string just something that you go copy and put in your code where you need it?
from figgle.
With the source generator, the output string is computed at compile time, rather than at run time, so it's faster when your program runs (nothing to compute) and you don't need to ship Figgle binaries (which include large font files, embedded).
So your program could resemble this:
[GenerateFiggleTextAttribute("DevelopmentString", "standard", "Development")]
public partial class StartupBanners
{
}
public static class Greeter
{
public static void PrintDevelopment() => Console.WriteLine(StartupBanners.DevelopmentString);
}
from figgle.
Thank you for your help with this. I appreciate it.
How difficult is it to remove all the fonts except one from the runtime package?
from figgle.
It would require some refactoring of the packages I think. You can easily parse a single figlet file using the APIs, but today the core fonts are embedded for convenience.
See #12.
from figgle.
Do you mind if I pull the source and give it a shot?
from figgle.
You're welcome to play with it! But if you're hoping to land a change in this repo, I recommend sharing a proposal as to how that might work before submitting a PR. That could save you a bunch of time.
Let's continue the discussion in #12. Looks like the original issue here has been addressed so I'll close this.
from figgle.
Related Issues (14)
- Support smushing HOT 1
- Additional fonts HOT 1
- Installing nuget package adds tons of unnecessary references HOT 11
- Print on the Same Line Different Color HOT 4
- How to auto newline? HOT 1
- Add command line tool HOT 1
- Investigate source generator support HOT 1
- Make the lookup case insensitive HOT 4
- How do I add external fonts to be used? HOT 1
- suggestion: unbundle fonts from engine HOT 6
- Exception rendering text using EftiChess font
- netstandard2.0 support HOT 1
- NuGet package supporting netstandard 2.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from figgle.