|
10-21-2014, 03:38 PM
|
#1
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
text and graphics like Jesusonic JS?
EDIT: I discovered the "Terminal" or Dos or Fixedsys font is similar to Jesusonic, and I prefer the terminal font due to it being slightly larger, so easier to read for those who might find smaller text difficult. So I'll stick with this. I'm assuming it's easy to use any font with WDL...??
I want to add the "Jesusonic" look to my VST with WDL. Is it possible? That Jesusonic font is just so perfect! I want to add a console-like text display to the black screen at the bottom left for controls and general info for user. Is that font specific to JS or available as a font file?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Last edited by Argitoth; 10-21-2014 at 09:01 PM.
|
|
|
10-22-2014, 04:10 AM
|
#2
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by Argitoth
I'm assuming it's easy to use any font with WDL...??
|
Sure, as long as the font is installed in the user's OS, which is why I prefer to use only standard fonts like Arial. BTW, I don't know if Terminal is a standard font.
|
|
|
10-22-2014, 05:06 AM
|
#3
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
I think it uses lice_text, which contains a basic bitmap font:
https://github.com/olilarkin/wdl-ol/.../lice_text.cpp
this file is not included by default in the lice visual studio / xcode project in WDL-OL, you'll have to add it.
then you can use
LICE::LICE_DrawText(pGraphics->GetDrawBitmap(),0,10,"hello world",LICE_RGBA(255,255,255,255),1.0f,0);
from your IControl's draw method
oli
|
|
|
10-22-2014, 07:11 AM
|
#4
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
wow, the font is literally made out of ascii art e.g. the heart
Code:
/* 3 0x03 '^C' */
0x6c, /* 01101100 */
0xfe, /* 11111110 */
0xfe, /* 11111110 */
0xfe, /* 11111110 */
0x7c, /* 01111100 */
0x38, /* 00111000 */
0x10, /* 00010000 */
0x00, /* 00000000 */
Quote:
Originally Posted by Tale
Sure, as long as the font is installed in the user's OS, which is why I prefer to use only standard fonts like Arial. BTW, I don't know if Terminal is a standard font.
|
So the font isn't "rendered" into the application after complining, it actually re-generates text in realtime while in use by end user? (And that's why you can only use standard fonts)
And that would explain why Jesusonic font is made from ascii art.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
10-22-2014, 11:09 AM
|
#5
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Thanks Oli!
Sorry uhh, can't figure out of this is a stupid question or not after a few hours of looking at code, what's the syntax for accessing an IControl's draw method?
Also, I discovered bitmap text from IPlugText example. There's an image of black and white text. I could create that with Jesusonic, but I need to use blend modes for the text, and I need to change the color a lot. Can you use bitmap text and change the text color at all?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
10-22-2014, 12:57 PM
|
#7
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Before I consider using LICE_DrawText function, what are the limitations of the IBitmap and IBitmapTextControl?
e.g.
Code:
IBitmap blackText = pGraphics->LoadIBitmap(TEXT_BLACK_ID, TEXT_BLACK_FN, 95, true);
IRECT tmpRect6(10, 250, 400, 170);
pGraphics->AttachControl(new IBitmapTextControl(this, tmpRect6, &blackText, "i'm bitmap monospace text"));
Is it possible to change the color without having to create a new bitmap for each color?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
10-22-2014, 01:00 PM
|
#8
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
IBitmapTextControl is really basic, I meant to make it possible to change the colour of a monochrome bitmap but i never got round to it
|
|
|
10-24-2014, 03:11 AM
|
#9
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by Argitoth
So the font isn't "rendered" into the application after complining, it actually re-generates text in realtime while in use by end user? (And that's why you can only use standard fonts)
|
Exactly. Note that you can use non-standard fonts, but then I guess you would have to install them along with your application.
|
|
|
10-24-2014, 03:51 AM
|
#10
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Quote:
Originally Posted by Tale
Exactly. Note that you can use non-standard fonts, but then I guess you would have to install them along with your application.
|
Is that acceptable in the world of VSTs? I usually like to move my dll vst files around (computer to computer) and if the installer wasn't run on one of them, then that would create bad results. Also, I don't like having to run an installter for vsts... I guess I'm answering my own question.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
10-24-2014, 03:01 PM
|
#11
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
FYI, at least on OSX, I've run into odd issues when trying to use fonts that were not installed on the system, so if you are relying on the fonts being installed and want to move the dll file around, you may want to reconsider.
|
|
|
10-24-2014, 06:16 PM
|
#12
|
Human being with feelings
Join Date: May 2012
Location: PA, USA
Posts: 356
|
Quote:
Originally Posted by bozmillar
FYI, at least on OSX, I've run into odd issues when trying to use fonts that were not installed on the system, so if you are relying on the fonts being installed and want to move the dll file around, you may want to reconsider.
|
I had the same issue.
I know what you are saying about the ease of the VST .dll file, but there are some benefits to using an installer. If you package a font within the installer, then you know that the user will have it and the plugin will work.
I don't know if you can uninstall some of the systems fonts on OSX or Windows, but if you can, you can guarantee someone will do it and run into plugin problems.
If you are using native fonts, I would stick to the very basics to ensure compatibility. I don't know how accurate this is, but you might want to take a look http://www.apaddedcell.com/sites/www...nal/index.html
|
|
|
10-24-2014, 06:22 PM
|
#13
|
Human being with feelings
Join Date: Sep 2009
Posts: 623
|
Quote:
Originally Posted by random_id
I don't know if you can uninstall some of the systems fonts on OSX or Windows, but if you can, you can guarantee someone will do it and run into plugin problems.
|
yeah, never underestimate the crazy ways people can find to break something.
|
|
|
10-24-2014, 07:07 PM
|
#14
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
For my application, a bitmap font (or some kind of image reference for font) would be ideal, so I'm pretty determined to get bitmap fonts working either with color-per-file or writing code to translate a monochrome bitmap to change color.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
10-24-2014, 09:58 PM
|
#15
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Why not just use white bitmap font and do a color add with a rect or whatever blend mode would be appropriate?
like in this youtube video: https://www.youtube.com/watch?v=oVFiubtNsrk
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
10-24-2014, 10:48 PM
|
#16
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Quote:
Originally Posted by http://www.cockos.com/wdl/
LICE - Lightweight Image Compositing Engine:- 32bpp 2D image engine with full alpha channel support
- PNG, JPEG, GIF, BMP, PCX, ICO loading
- Many blend modes including copy, additive, subtractive, dodge, multiplicative, overlay, HSV adjust
- Glyph and text drawing systems (including cached-system-text drawing)
- Texture generators
|
...it seems like what I want to do is already implemented in WDL.
Edit: I'm going to use Lucida Console font and the iText Control in the mean time, and will probably tackle using custom fonts (without adding the requirement to install) at a later date.
Edit2: AND FOR MY FIRST ACT... I shall learn to render text with iControl. And I'll update this post as I do it. The goal here is to create something that is reminiscent of a console application. (And hopefully implement both keyboard and mouse interactions where you can drag values up/down and type them in.)
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Last edited by Argitoth; 10-24-2014 at 11:16 PM.
|
|
|
10-25-2014, 02:09 AM
|
#17
|
Human being with feelings
Join Date: Nov 2008
Posts: 108
|
Quote:
Why not just use white bitmap font and do a color add with a rect or whatever blend mode would be appropriate?
|
that's not gonna work.. with a white text bitmap you'd want to multiply-blend with the desired color
rendering a monochrome monospaced console-like bitmap font is easy
coding text input is pretty nasty.. think of everything you can do in a console, like up/down/left/right arrows, backspace, delete, home, end, shift and ctrl in combination with any of the keys i mentioned.. tab, clipboard?
yeah.. it's nasty
|
|
|
10-25-2014, 03:12 AM
|
#18
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Quote:
Originally Posted by antto
coding text input is pretty nasty.. think of everything you can do in a console, like up/down/left/right arrows, backspace, delete, home, end, shift and ctrl in combination with any of the keys i mentioned.. tab, clipboard?
yeah.. it's nasty
|
That doesn't sound too bad. Also the iPlugEEL example has a text box that does responds to almost all controls... all except ctrl+a for some reason. (The text box seems to behave like a default Windows text box)
But indeed my goal is to eventually give the user the ability to do stuff like:
LFO1 -> Oscillator1:Pitch
using code interpretation techniques (maybe EEL interpreter + regex or other libraries).
But for now my rendered text will just be like a value slider, and maybe implement a double click to type in values.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
10-30-2014, 10:07 AM
|
#19
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Is there an example of a text updating its value display via parameter change?
Edit: IPlugDistortion and IPlugConvoEngine. GOT IT.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Last edited by Argitoth; 10-30-2014 at 10:15 AM.
|
|
|
10-30-2014, 10:52 AM
|
#20
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
sorry double post...
I'm struggling with this concept of library vs personal code. So I don't like the boldness of the bold text. I go in to look at the code and I find tout there's this thing called FW_BOLD, and there's actually many bold types!
IGraphics.cpp:
Code:
int wt = (pTxt->mStyle == IText::kStyleBold ? FW_BOLD : FW_NORMAL);
IGraphicsWin.cpp:
Code:
HFONT font = CreateFont(pText->mSize, 0, 0, 0, pText->mStyle == IText::kStyleBold ? FW_BOLD : 0, pText->mStyle == IText::kStyleItalic ? TRUE : 0, 0, 0, 0, 0, 0, 0, 0, pText->mFont);
wingdi.h:
Code:
/* Font Weights */
#define FW_DONTCARE 0
#define FW_THIN 100
#define FW_EXTRALIGHT 200
#define FW_LIGHT 300
#define FW_NORMAL 400
#define FW_MEDIUM 500
#define FW_SEMIBOLD 600
#define FW_BOLD 700
#define FW_EXTRABOLD 800
#define FW_HEAVY 900
Great! The only problem is that the library only specifies one type of bold and if I make changes to the library (and there's a library update) then those changes will be overwritten when I update, right? What do I do?
Edit: Also "FW_DONTCARE" is pretty funny.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Last edited by Argitoth; 10-30-2014 at 10:58 AM.
|
|
|
10-31-2014, 04:05 PM
|
#21
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by Argitoth
The only problem is that the library only specifies one type of bold and if I make changes to the library (and there's a library update) then those changes will be overwritten when I update, right? What do I do?
|
You should learn to use a version control software. In the case of WDL/IPlug, that would be "git". The version control software allows you to manage changes you've yourself made and then merge new updates to the library, among other things.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
10-31-2014, 05:05 PM
|
#22
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
Ok, I shall do that! Thanks Xenakios. And I'm guessing this will also open the possibility of merging my changes with the "master" WDL-OL? I'll see if I can add more "bold weights" in a way that would be merge-able. Will post details as I go.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
11-01-2014, 01:18 AM
|
#23
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by Argitoth
Ok, I shall do that! Thanks Xenakios. And I'm guessing this will also open the possibility of merging my changes with the "master" WDL-OL? I'll see if I can add more "bold weights" in a way that would be merge-able. Will post details as I go.
|
If you want your changes to be merged into the official WDL-OL repository, don't forget to support OS-X too!
Doing your private branches and merges with the official WDL-OL will probably work just fine if the font stuff is something that isn't often/ever touched by Oli.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
11-01-2014, 03:11 AM
|
#24
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
if you're very concerned about the way fonts look, bitmap fonts or integrating something like freetype (not for the faint hearted) is the way way to go, so you can make it look the same on all platforms.
I think even these fonts on windows could look different on different systems, depending on cleartype etc (might be wrong about that)
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:02 AM.
|