Code Monkey home page Code Monkey logo

Comments (10)

andy840119 avatar andy840119 commented on July 21, 2024

Or this demo.
Only see OpenGL Demo because other project is written for other framework.

from osu-framework-font.

andy840119 avatar andy840119 commented on July 21, 2024

Or using image sharp to draw text?
SixLabors/ImageSharp#407
See the example here, might install SixLabors.Fonts(in prelease).

from osu-framework-font.

andy840119 avatar andy840119 commented on July 21, 2024

Sample code has been created.
Need to calculate the time it spend.

Edit:
ImageSharp cost too much time 😢

from osu-framework-font.

andy840119 avatar andy840119 commented on July 21, 2024

http://geoffprewett.com/blog/software/opengl-outline/
Maybe it's better add .fs file and deal with outline effect.

from osu-framework-font.

andy840119 avatar andy840119 commented on July 21, 2024

Or trying https://gist.github.com/xoppa/33589b7d5805205f8f08
.
Note :
can search openGL texture outline GLSL to get more relative info.
And this sample is just for testing.

from osu-framework-font.

andy840119 avatar andy840119 commented on July 21, 2024

Writing GLSL in vscode :
https://www.youtube.com/watch?v=WNcczXF4hSY
.
Install Shader languages support for vscode and glsl canvas in vscode.

from osu-framework-font.

andy840119 avatar andy840119 commented on July 21, 2024

Run this project and check is it workable with text.
Run this project and try to change texture, change outline size and color first.
.
Edit :
image
Not working perfect 😢

from osu-framework-font.

andy840119 avatar andy840119 commented on July 21, 2024

Running this code :

new SpriteText
{
    Text = "Outlined Text",
    Font = new FontUsage(size: 72),
}.WithEffect(new OutlineEffect
{
    BlurSigma = new Vector2(3f),
    Strength = 100f,
    Colour = Color4.Blue,
    PadExtent = true,
}),

Can have this effect :
image
.
Maybe create IEffect like KaraokeSolidOutlineEffect and try to loading them like :

Child = InitializeEffect?.invoke(x => {
   //...
});

Then like
karaokeText.InitializeEffect = (x) => {
x.WithEffect(KaraokeSolidOutlineEffect){
// Parameter
}
}
in DrawableLyric

from osu-framework-font.

andy840119 avatar andy840119 commented on July 21, 2024

Also need to test about accept multi outline effect at the same time?

from osu-framework-font.

andy840119 avatar andy840119 commented on July 21, 2024

Implemented in #43 using shader.
Finally.

from osu-framework-font.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.