These are chat archives for arenanet/api-cdi

17th
Jul 2017
Werdes
@werdes
Jul 17 2017 12:08
for spotify you can also tap the local web api the webhelper brings. that's very sketchy though, and you need the desktop client installed.
Eearslya Sleiarion
@Eearslya
Jul 17 2017 15:59
What is that actually?
BoyC
@BoyC
Jul 17 2017 16:01
i wouldn't even be surprised if it was a grabovoi number of some sort :D
windwarrior
@windwarrior
Jul 17 2017 16:41
Food for thought: A browser accepts any HTML right, as insane as it gets and it will try to display something. These rules are written down in the standard of how to parse HTML. Does that mean that there is no possible way to write invalid HTML because there is always a recovery rule to fix your "mistake"?

^ in case it gets lost in the history

@Darqam the... the pistol?

smiley
@codemasher
Jul 17 2017 17:01
you mean "html that's impossible to render"
g'morning @lye btw
mornin'
BoyC
@BoyC
Jul 17 2017 17:02
hiyya
@windwarrior is quirks mode standard-defined? I was under the impression that invalid HTML = undefined behavior
windwarrior
@windwarrior
Jul 17 2017 17:02
hmm there seem to be some rules
smiley
@codemasher
Jul 17 2017 17:03
invalid html = invalid according to w3c validator :P
windwarrior
@windwarrior
Jul 17 2017 17:04
thats like saying that any valid php can be interpreted by the Zend php engine
smiley
@codemasher
Jul 17 2017 17:04
Does that mean that there is no possible way to write invalid HTML
so
Eearslya Sleiarion
@Eearslya
Jul 17 2017 17:05
@lye pretty sure he meant to highlight the thanks
ah fair :>
BoyC
@BoyC
Jul 17 2017 17:07
@lye: thanks that single trebuchet filename with the charcode range was the key to figuring out the fonts :D
XD
there's a bunch of filenames -- one for each style/size pair
if you don't e.g. want italics
BoyC
@BoyC
Jul 17 2017 17:08
oh i can now tell you stuff about your font format that you prolly don't know off the top of your head :)
(technically one for each font/style/size tuple)
haha probably
did you manage to pull out the kerning data too? or just the raster?
BoyC
@BoyC
Jul 17 2017 17:08
there's no kerning data from what i saw
not referenced anywhere
yeah it's just a binary blob next to the raster iirc
BoyC
@BoyC
Jul 17 2017 17:09
the raster datafiles are literally 4byte descriptor, rle compressed image, 4byte descriptor, rle compressed image repeat for each glyph
lol so the kerning data is probably baked into the raster
that's the worst way to do it
BoyC
@BoyC
Jul 17 2017 17:10
yep, but saved me a ton of work :)
it's not perfect, off by a pixel here and there so there might be some kerning data or postprocess calculation or whatever going on
outlining and dropshadows are done on the fly by the client
so i updated the fonts in taco and the first comment was "the fonts are too big where can i change them" :D
haha are you already using the smallest font size we embed?
BoyC
@BoyC
Jul 17 2017 17:14
nah i used the appropriate chat fonts for each interface size
still room to use the smaller ones then :D
BoyC
@BoyC
Jul 17 2017 17:14
yeah, but the consistency!
:O
BoyC
@BoyC
Jul 17 2017 17:14
:D
windwarrior
@windwarrior
Jul 17 2017 17:19
so its just a plain old bitmap font?
BoyC
@BoyC
Jul 17 2017 17:19
well
~100 mbytes of it, compressed
it's the way most game engines work, it's consistent, less fiddly, easy to implement, faster and more robust
the price is the toolchain to bake it, but there are good tools for that (bmfont being one of them)
windwarrior
@windwarrior
Jul 17 2017 17:20
so its basically a sort of lookup table of how to kern multiple characters together?
BoyC
@BoyC
Jul 17 2017 17:20
that's a feature that may be available, but more often than not is omitted
windwarrior
@windwarrior
Jul 17 2017 17:21
oh right its also all font sizes pre-baked
BoyC
@BoyC
Jul 17 2017 17:21
yeah
windwarrior
@windwarrior
Jul 17 2017 17:21
rip, thats quite some megs
BoyC
@BoyC
Jul 17 2017 17:21
126 fonts in the gw2 datafile
about 2/3 of the "unknown" files is actually glyph data
IMO there's nothing wrong with just using freetype and pulling in TTF files at runtime -_-
I don't get why people have such affinity for bitmap fonts
BoyC
@BoyC
Jul 17 2017 17:22
oh
windwarrior
@windwarrior
Jul 17 2017 17:22
I would be like, you could make a lookup of if I saw an "a" and I now see a "b", I take this prebaked kerned glyph
for that "b"
BoyC
@BoyC
Jul 17 2017 17:22
that's a sore spot, i can tell you :D
really? do tell
BoyC
@BoyC
Jul 17 2017 17:23
been working on text rendering at work for the better part of the year
like you still have to do glyph-texture juggling
BoyC
@BoyC
Jul 17 2017 17:23
need to implement complex text rendering for all possible languages basically
and layouting
it's a bit difficult to render arabic when you have no idea what's supposed to be on the screen
when you say "complex text rendering" are we talking about unicode ... joining sequences? whatever they're called
yeah RTL markers and stuff are fun too
BoyC
@BoyC
Jul 17 2017 17:24
i mean complex scripts
rtl embedded with latin text etc
that sounds like a nightmare
BoyC
@BoyC
Jul 17 2017 17:24
and the opensource stuff to do it is a literal nightmare
sure, but my beef isn't layout -- it's embedding 200MB of bitmaps vs. a single vector TTF
BoyC
@BoyC
Jul 17 2017 17:25
starts off with freetype to render the glyphs, harfbuzz works with that to do the shaping and pango on top of that does the layouting
then it renders differently because of random float inconsistencies on embedded hardware vs pc
haha god float inconsistencies
BoyC
@BoyC
Jul 17 2017 17:26
we never managed to pull it off, pango integration was such a nightmare that after 3 months of trying they scrapped it (we need to have this for win, mac, android, and ios)
pretty sure you can fix that with some magic to force IEEE759 conformance
BoyC
@BoyC
Jul 17 2017 17:26
so we went with a paid solution
from monotype
what'd you end up using instead?
ah fair
BoyC
@BoyC
Jul 17 2017 17:26
i never knew you could actually fall in love with a third party library until then
i mean
it's an actual product
with proper documentation
and works as expected
heh
BoyC
@BoyC
Jul 17 2017 17:27
yeah, imagine our surprise :D
for the free solutions we'll probably go with native rendering, a lot less of a hassle but will look different on each platform a bit
and then when we eventually get to QNX, we'll just have to bite the bullet and do the integration or write our own stuff instead of pango... apparently every project ever that has used it is ditching it for their own solution it's so crappy
BoyC
@BoyC
Jul 17 2017 17:33
so yeah compared to this, for a game, adding 100 megs of additional data is a good compromise :)
ChieftainAlex
@ChieftainAlex
Jul 17 2017 17:43
@lye would you mind looking into where these crazy floors are coming from over the HoT region? https://api.guildwars2.com/v2/maps?ids=1052 (floor 47/48), not sorted either -_-
Archomeda
@Archomeda
Jul 17 2017 17:52
am i the only one or is the gitter tab like using up 100% of one cpu in chrome?
wait, that's not right
chrome is using 100% of one cpu on whichever tab is active
seems like a broken plugin
problem solved, nvm
Darqam
@Darqam
Jul 17 2017 18:07
@lye, the mention was for the thank you right above my message
BoyC
@BoyC
Jul 17 2017 19:03
Hmm got an interesting request. @lye am I right to assume that any sort of LFG api would need to be part of the chat-api style local communication?
The guy asked for a compact lfg overlay that could be kept open to watch for stuff.
nah they're totally different interfaces
BoyC
@BoyC
Jul 17 2017 19:09
what i meant was that it's not something that sounds viable for a web api so if ever something like this came to be it'd have to be local to the client
darthmaim
@darthmaim
Jul 17 2017 19:10
#510 ?
BoyC
@BoyC
Jul 17 2017 19:11
oh
need to go through that list again one of these days :)
LFG can totally be done via web API
BoyC
@BoyC
Jul 17 2017 19:15
with how fast of a cache time?
eh could make it pretty low
depends on the data
30 seconds maybe?
might be able to go lower than that if the data is small
BoyC
@BoyC
Jul 17 2017 19:20
hm that's pretty cool
Archomeda
@Archomeda
Jul 17 2017 20:25
dusting off some of my old gw2 file decompression code... urgh, wth did i even do here? :D
Eearslya Sleiarion
@Eearslya
Jul 17 2017 20:32
^ 90% of my code older than a month
^ 90% of my everything
Archomeda
@Archomeda
Jul 17 2017 21:10
good thing, i think it should still work because i finished it
but i never actually used it for anything heh
Archomeda
@Archomeda
Jul 17 2017 23:04
well.... it apparently still works for 32-bit...
but it somehow doesn't in 64-bit... hmmmmm
BoyC
@BoyC
Jul 17 2017 23:04
you mean the 32 bit client?
Archomeda
@Archomeda
Jul 17 2017 23:05
no, the file decompression code
BoyC
@BoyC
Jul 17 2017 23:05
or in a 32 bit build :)
Archomeda
@Archomeda
Jul 17 2017 23:05
just my own code ^^
also, i found out that visual studio is weird
you're probably casting to a numeric type with an implementation-defined size, like int or unsigned
Archomeda
@Archomeda
Jul 17 2017 23:06
probably
BoyC
@BoyC
Jul 17 2017 23:06
or relying on the size of pointers in a struct
assuming it's c/c++
Archomeda
@Archomeda
Jul 17 2017 23:06
well that part is definitely c++
i'm pinvoking from c#
because apparently in the past i realized i couldn't write a fast decompressor in c#
BoyC
@BoyC
Jul 17 2017 23:07
did you write the decompressor from scratch?
Archomeda
@Archomeda
Jul 17 2017 23:08
kind of, while looking at existing implementations
BoyC
@BoyC
Jul 17 2017 23:08
ah
Archomeda
@Archomeda
Jul 17 2017 23:08
i had to write my own entry point though
BoyC
@BoyC
Jul 17 2017 23:08
yeah that's pretty easy to mess up
what i'd do in your place (if you don't see anything obvious) would be to take two debug sessions, one for the 32 and one for the 64 bit routine and check where the execution differs
Archomeda
@Archomeda
Jul 17 2017 23:09
that's not a bad idea
i think it's actually something at the start of decompressing
i hope
maybe just a type initialization fail on my part
BoyC
@BoyC
Jul 17 2017 23:11
if there's one there's probably more like it
allright, gotta rewatch the first 5 minutes of the GoT premiere and then off to bed :) nite and gl
Archomeda
@Archomeda
Jul 17 2017 23:12
lol thanks :)
Archomeda
@Archomeda
Jul 17 2017 23:37
ah whoops
yeah, i think i know what this issue is
the compiler was throwing warnings at me earlier that there was some potential loss of data, because of casting of a bigger type to a smaller one; i, in good faith, added a preprocessor directive to have it set to a bigger type for 64-bit builds
apparently, there was some hardcoded stuff in my bitreader that only accounted for 32bit arrays
while the array was 64bit wide on 64bit builds, and the rest of the code happily assumed that there were actually 64bit numbers in there, while there actually weren't
they were just 32bit numbers stored in a 64bit array :D